Module function reference

escape

A reference entry for escape

Module function · HTML

escape escape (string text) ⇒ string

Escapes text for use in HTML text content.

Example

YASS
$html = HTML::escape("<p>Hello & goodbye</p>")

Input: <p>Hello & goodbye</p>

Output: &lt;p&gt;Hello &amp; goodbye&lt;/p&gt;