Module function reference

escape_attribute

A reference entry for escape_attribute

Module function · HTML

escape_attribute escape_attribute (string text) ⇒ string

Escapes text for use in an HTML attribute value.

Example

YASS
$value = HTML::escape_attribute("Jamie & \"Co\"")

Input: Jamie & "Co"

Output: Jamie & "Co"