Reference Guide > H Routines > HTML_SAFE Function
  

HTML_SAFE Function
Allows special characters defined in HTML to be displayed as text, rather than using them for format tagging.
Usage
html_str = HTML_SAFE(str)
Input Parameters
strA text string that may contain special HTML characters.
Keywords
None.
Returned Value
html_strA string containing the HTML escape sequences for the special characters included in str.
Discussion
The HTML_SAFE function easily allows the special HTML formatting characters to be interpreted as text. The special characters covered by HTML_SAFE are the left and right angle brackets (< and >); the ampersand (&); and quotation marks (“ ”). HTML_SAFE assures that these characters will be translated to their HTML escape sequence, so that the browser will display them as intended.
 
note
All text-related HTML routines in PV‑WAVE have a Safe keyword, which calls the HTML_SAFE function to escape any special characters contained in the text.
Example
For this example, you could achieve the same result by using the Safe keyword with HTML_HEADING procedure.
HTML_OPEN
str = 'Use the <OL> tag to define an ordered list.'
HTML_HEADING, HTML_SAFE(str)
HTML_CLOSE
See Also
HTML_BLOCK, HTML_HEADING, HTML_HIGHLIGHT, HTML_LIST, HTML_OPEN, HTML_PARAGRAPH, HTML_TABLE

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.