Function rex_escape
Parameters summary
mixed |
$value |
The value to escape |
string |
$strategy = 'html' |
Supported strategies: "html": escapes a string for the HTML context.
"html_attr": escapes a string for the HTML attrubute context. It is only
necessary for dynamic attribute names and attribute values without quotes
(<code>data-foo=bar</code>). For attribute values within quotes you can use
default strategy "html". "js": escapes a string for the JavaScript/JSON context.
"css": escapes a string for the CSS context. CSS escaping can be applied to any
string being inserted into CSS and escapes everything except alphanumerics.
"url": escapes a string for the URI or parameter contexts. This should not be
used to escape an entire URI; only a subcomponent being inserted. |
Return value summary
Thrown exceptions summary
InvalidArgumentException
|
InvalidArgumentException
|