Subversion-Projekte lars-tiefland.laravel_shop

Revision

Zur aktuellen Revision | Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
unescape {#language.modifier.unescape}
2
========
3
 
4
`unescape` is used to decode `entity`, `html` and `htmlall`. It counters
5
the effects of the [escape modifier](#language.modifier.escape) for the
6
given types.
7
 
8
   Parameter Position    Type    Required                                                Possible Values                                                 Default  Description
9
  -------------------- -------- ---------- ------------------------------------------------------------------------------------------------------------ --------- ------------------------------------------------------------------------------------------------------------------------------
10
           1            string      No                                             `html`, `htmlall`, `entity`,                                          `html`   This is the escape format to use.
11
           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.
12
 
13
 
14
    <?php
15
 
16
    $smarty->assign('articleTitle',
17
                    "Germans use &quot;&Uuml;mlauts&quot; and pay in &euro;uro"
18
                    );
19
 
20
    ?>
21
 
22
 
23
 
24
These are example `unescape` template lines followed by the output
25
 
26
 
27
    {$articleTitle}
28
    Germans use &quot;&Uuml;mlauts&quot; and pay in &euro;uro
29
 
30
    {$articleTitle|unescape:"html"}
31
    Germans use "&Uuml;mlauts" and pay in &euro;uro
32
 
33
    {$articleTitle|unescape:"htmlall"}
34
    Germans use "Ümlauts" and pay in €uro
35
 
36
 
37
 
38
See also [escaping smarty parsing](#language.escaping), [escape
39
modifier](#language.modifier.escape).