@escape() Function

Top  Previous  Next

@escape() function converts the special XML characters into special entries.

Syntax:

@escape(string-expression[,chars-to-escape])

 

string-expression

The string to escape the special characters

chars-to-escape

The special characters to escape. If omitted all of the & < > ' " characters are escaped into &amp; &lt; &gt; &apos; &quot;

 

Examples:

@escape('<td width="120"/>')             @// Result : &lt;td width=&quot120&quot;/&gt;

@escape('<text>John & Sons</text>','&')  @// Result : <text>John &amp; Sons</text>