Helma logo
helma.org » Home > Stories > res.encode()

res.encode()

Writes a string as smooth HTML to the output buffer.

Encodes a string by replacing linebreaks with <br /> tags and diacritical characters as well as HTML tags with their equivalent HTML entities and immediately outputs it.

Syntax
res.encode(String)

Example
res.encode("<b>Bananer växer\n minsann inte på träd.</b>");
&lt;b&gt;Bananer v&auml;xer
<br /> &lt;br&gt; minsann inte p&aring; tr&auml;d.&lt;/b&gt;


... comment


Page last modified on 2002-07-10 08:15 by hns