This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:htmlspecialchars [2017/04/11 11:24] jeff |
uphp:functions:htmlspecialchars [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | < | + | |
<span style=" | <span style=" | ||
- | <span style=" | + | <span style=" |
- | </ | + | |
- | [[htmlspecialchars]] ( | + | |
- | < | + | |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
- | </ | + | </ |
- | </ | + | |
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to be displayed in a browser "as is." This function returns a string with these conversions made. | Certain characters have special significance in HTML, and should be represented by HTML entities if they are to be displayed in a browser "as is." This function returns a string with these conversions made. | ||
Line 24: | Line 19: | ||
====Parameter==== | ====Parameter==== | ||
- | < | + | < |
- | ====Return | + | ====Return |
- | < | + | < |
^CHARACTER^NAME^TRANSLATED (HTML ENTITY)^ | ^CHARACTER^NAME^TRANSLATED (HTML ENTITY)^ | ||
- | |& | + | |& |
- | |" | + | |" |
- | |' | + | |' |
- | |<|less than|& | + | |<|less than|'' |
- | |> | + | |> |
====Examples==== | ====Examples==== | ||
Line 53: | Line 48: | ||
</ | </ | ||
- | Without conversion by [[htmlspecialchars]] the browser would instead display the hyperlink < | + | (Without conversion by [[htmlspecialchars]] the browser would instead display the hyperlink < |
- | **Read the file index.cgi line by line and format the output for display on the browser screen:** | + | ===Read the file index.cgi line by line and format the output for display on the browser screen=== |
<code php> | <code php> |