• function

can.esc

 

Escapes a string for insertion into HTML.

can.esc( "&" ) //-> "<foo<&<bar<"

can.esc(str)

Parameters

  1. str {String}

    The string to escape

Returns

{String}

The HTML escaped string.

can.esc(string) escapes a string for insertion into html.

can.esc( "<foo>&<bar>" ) //-> "&lt;foo&lt;&amp;&lt;bar&lt;"