ns_quotehtml - Escape HTML characters so they appear as-is in HTML pages
TABLE OF CONTENTS
SYNOPSIS
DESCRIPTION
COMMANDS
EXAMPLES
|
Returns the contents of html with certain characters that are special in HTML replaced with an escape code. This allows text displayed in a webpage that might otherwise be interpreted as containing HTML markup instructions to be interpreted as literal characters to be displayed. Specifically: ns_quotehtml > becomes &
% ns_quotehtml "Hello World!" Hello World! |
% ns_quotehtml "The <STRONG> tag is used to indicate strongly emphasized text." The &lt;STRONG&gt; tag is used to indicate strongly emphasized text. |
% ns_quotehtml {<span class="foo">}
&lt;span class=&#34;foo&#34;&gt;
|
NOTES The set of characters that are substituted and their replacements may be different in previous versions of NaviServer. For example, NaviServer 2.x does not escape single or double-quotes.