Samples

SamplesXml

Code

Config

API Docs

Download

Neolectric

Html Encoding

Encode your own text or use the default

<dxp:HtmlEncode value="${content}" store="htmlcontent"/>

Display htmlcontent

<table border="0">
<tr bgcolor="#ffffee" ><td align="left">${htmlcontent}</td></tr>
</table>

Original content

Converted content

Footnote:

The dxp:HtmlEncode tag (request param to html) uses the HtmlSyntax class to convert urls that begin with http, htts, ftp to hyperlinks. It also tries to convert items that "appear" to be email addresses into "mailto" hyperlinks. This is not foolproof.

  • john@somewhere.com will be converted
  • john@somewhere.xyz is converted even though .xyz is not a vaild domain suffix.
  • john@somewhere will become simple html text because there is no domain suffix.

You may find a regular expression that you want to use instead of HtmlSyntax or you could modify the class to your liking.