-
Notifications
You must be signed in to change notification settings - Fork 35
unescape
Umakant Patil edited this page Aug 14, 2017
·
1 revision
_unescape _is used to decode entity, html and htmlall. It counters the effects of the escape modifier for the given types.
This modifier for some formats may use JavaScript ports of PHP functions htmlspecialchars(), htmlentities, rawurlencode You can find them at phpjs.org
Parameter Position | Type | Required | Default | Description |
---|---|---|---|---|
1 | string | No | html | This is the escape format to use. Possible values are: html, htmlall, and entity |
2 | string | No | UTF-8 | The character set encoding passed to html_entity_decode() or htmlspecialchars_decode() or mb_convert_encoding() et. al. ISO-8859-1, UTF-8, and any character set supported by htmlentities() |
Template:
{$articleTitle = "Germans use "Ümlauts" and pay in €uro"}
{$articleTitle}
{$articleTitle|unescape:"html"}
{$articleTitle|unescape:"htmlall"}
output:
Germans use "Ümlauts" and pay in €uro
Germans use "Ümlauts" and pay in €uro
Germans use "Ümlauts" and pay in €uro
see also unescape in PHP Smarty documentation.