Method | Description | |
---|---|---|
attr ( string $string, string $strict = true ) : string | Escape common HTML attributes data | |
charIsUndefined ( string $char ) : boolean | Check if a character is undefined in HTML | |
convertEncoding ( string $char ) : string | Convert a character from UTF-8 to UTF-16BE | |
css ( string $string ) : string | Escape HTML style property values | |
html ( string $string ) : string | Escape HTML element content | |
js ( string $string ) : string | Escape JavaScript data values | |
noNeedToEscape ( string $string ) : boolean | Check if a string needs to be escaped or not | |
url ( string $string ) : string | Escape URL parameter values | |
xml ( string $string ) : string | Escape XML element content |
Method | Description | |
---|---|---|
escapeAttrChar ( array $matches ) : mixed | Escape character for HTML attribute | |
escapeCSSChar ( array $matches ) : string | Escape character for CSS | |
escapeJSChar ( array $matches ) : string | Escape character for JavaScript |
public static charIsUndefined ( string $char ) : boolean | ||
$char | string | |
return | boolean |
public static convertEncoding ( string $char ) : string | ||
$char | string | |
return | string |
protected static escapeAttrChar ( array $matches ) : mixed | ||
$matches | array | |
return | mixed | Unicode replacement if character is undefined in HTML, named HTML entity if available (only those that XML supports), upper hex entity if a named entity does not exist or entity with the &#xHH; format if ASCII value is less than 256. |
protected static escapeCSSChar ( array $matches ) : string | ||
$matches | array | |
return | string |
protected static escapeJSChar ( array $matches ) : string | ||
$matches | array | |
return | string |
public static noNeedToEscape ( string $string ) : boolean | ||
$string | string | |
return | boolean |