escapeHtmlString

Eschape html special chars: & " ' < >

string
escapeHtmlString
(
string data
)

Examples

escape html strings

"&\"'<>".escapeHtmlString.should.equal("&amp;&quot;&#039;&lt;&gt;");

Meta