can.esc

  • function
 

Escapes a string for insertion into HTML.

can.esc(str)

Parameters

  1. str {String}

    The string to escape

Returns

{String}

The HTML escaped string.

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