Difference between revisions of "HTML ENTITIES()"

From Recital Documentation Wiki
Jump to: navigation, search
 
(18 intermediate revisions by one user not shown)
Line 8: Line 8:
  
 
==See Also==
 
==See Also==
[[ASC()]], [[AT()]], [[ATNEXT()]], [[CHR()]], [[CHRTRAN()]], [[HTML_ENTITY_DECODE()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STR_REPLACE()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
+
[[ASC()]], [[AT()]], [[ATNEXT()]], [[CHR()]], [[CHRTRAN()]], [[DECODE()]], [[ENCODE()]], [[HTML_ENTITY_DECODE()]], [[INLIST()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[STR()]], [[STR_REPLACE()]], [[STREXTRACT()]], [[STRTRAN()]], [[STUFF()]], [[SUBSTR()]]
  
  
Line 15: Line 15:
  
  
The following characters are converted to their HML entity equivalents:
+
The following characters are converted to their HTML entity equivalents:
  
 
* Tab (chr(9))
 
* Tab (chr(9))
Line 28: Line 28:
  
 
==Example==
 
==Example==
<code lang="recital">
+
<pre>
 
<!-- dispmemo.rsp -->
 
<!-- dispmemo.rsp -->
 
<html>
 
<html>
Line 36: Line 36:
 
use example
 
use example
 
goto 1
 
goto 1
? "&lt;pre>"
+
? &quot;&lt;pre&gt;&quot; + html_entities(notes) + &quot;&lt;/pre&gt;&quot;
? html_entities(notes)
+
? "&lt;/pre>"
+
 
close databases
 
close databases
 
%>
 
%>
 
</body>
 
</body>
 
</html>
 
</html>
</code>
+
</pre>
  
  

Latest revision as of 14:26, 1 July 2011

Purpose

Function to return a string from a character string or memo field where qualifying characters have been replaced with their html entity equivalents


Syntax

HTML_ENTITIES(<expC> | <memofield>)


See Also

ASC(), AT(), ATNEXT(), CHR(), CHRTRAN(), DECODE(), ENCODE(), HTML_ENTITY_DECODE(), INLIST(), LEFT(), OCCURS(), RAT(), RIGHT(), STR(), STR_REPLACE(), STREXTRACT(), STRTRAN(), STUFF(), SUBSTR()


Description

The HTML_ENTITIES() function will search <expC> or <memofield> and return a string where qualifying characters have been replaced with their html entity equivalents.


The following characters are converted to their HTML entity equivalents:

  • Tab (chr(9))
  • Line feed (chr(10))
  • Carriage return (chr(13))
  • "
  • &
  • '
  • <
  • >


Example

<!-- dispmemo.rsp -->
<html>
<body>
<%
open database southwind
use example
goto 1
 ? "<pre>" + html_entities(notes) + "</pre>"
close databases
%>
</body>
</html>


Products

Recital Server, Recital