diff options
| author | Simon Wisselink <wisskid@users.noreply.github.com> | 2021-12-03 11:59:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-03 11:59:22 +0100 |
| commit | 428a701b1871b02078a663d51a9a6555195743b3 (patch) | |
| tree | 51a76b654fb742dd9ea1ee6595baa27f113bc7ca /docs/designers/language-modifiers/language-modifier-unescape.md | |
| parent | baebd59bb4da9fca89da382811b38c8313949c49 (diff) | |
| download | smarty-428a701b1871b02078a663d51a9a6555195743b3.tar.gz smarty-428a701b1871b02078a663d51a9a6555195743b3.tar.bz2 smarty-428a701b1871b02078a663d51a9a6555195743b3.zip | |
Feature/add docs (#689)
* Add converted docs repo
* Set theme jekyll-theme-minimal
* Removed BC docs, added TOC
* Added TOCs, rewrote most important links in documentation. Linked README to new Github Pages site
* some link fixes
Diffstat (limited to 'docs/designers/language-modifiers/language-modifier-unescape.md')
| -rw-r--r-- | docs/designers/language-modifiers/language-modifier-unescape.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/designers/language-modifiers/language-modifier-unescape.md b/docs/designers/language-modifiers/language-modifier-unescape.md new file mode 100644 index 00000000..58d0b3f7 --- /dev/null +++ b/docs/designers/language-modifiers/language-modifier-unescape.md @@ -0,0 +1,39 @@ +unescape {#language.modifier.unescape} +======== + +`unescape` is used to decode `entity`, `html` and `htmlall`. It counters +the effects of the [escape modifier](#language.modifier.escape) for the +given types. + + Parameter Position Type Required Possible Values Default Description + -------------------- -------- ---------- ------------------------------------------------------------------------------------------------------------ --------- ------------------------------------------------------------------------------------------------------------------------------ + 1 string No `html`, `htmlall`, `entity`, `html` This is the escape format to use. + 2 string No `ISO-8859-1`, `UTF-8`, and any character set supported by [`htmlentities()`](&url.php-manual;htmlentities) `UTF-8` The character set encoding passed to html\_entity\_decode() or htmlspecialchars\_decode() or mb\_convert\_encoding() et. al. + + + <?php + + $smarty->assign('articleTitle', + "Germans use "Ümlauts" and pay in €uro" + ); + + ?> + + + +These are example `unescape` template lines followed by the output + + + {$articleTitle} + Germans use "Ümlauts" and pay in €uro + + {$articleTitle|unescape:"html"} + Germans use "Ümlauts" and pay in €uro + + {$articleTitle|unescape:"htmlall"} + Germans use "Ümlauts" and pay in €uro + + + +See also [escaping smarty parsing](#language.escaping), [escape +modifier](#language.modifier.escape). |
