Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 1... Zeile -...
1
unescape {#language.modifier.unescape}
-
 
2
========
1
# unescape
Zeile 3... Zeile 2...
3
 
2
 
4
`unescape` is used to decode `entity`, `html` and `htmlall`. It counters
3
`unescape` is used to decode `entity`, `html` and `htmlall`. It counters
5
the effects of the [escape modifier](#language.modifier.escape) for the
4
the effects of the [escape modifier](language-modifier-escape.md) for the
Zeile -... Zeile 5...
-
 
5
given types.
-
 
6
 
-
 
7
## Basic usage
-
 
8
```smarty
-
 
9
{$myVar|unescape}
-
 
10
```
-
 
11
 
6
given types.
12
## Parameters
7
 
13
 
8
   Parameter Position    Type    Required                                                Possible Values                                                 Default  Description
14
| Parameter Position | Type   | Required | Possible Values                                                                                                | Default | Description                                                                                                                  |
9
  -------------------- -------- ---------- ------------------------------------------------------------------------------------------------------------ --------- ------------------------------------------------------------------------------------------------------------------------------
15
|--------------------|--------|----------|----------------------------------------------------------------------------------------------------------------|---------|------------------------------------------------------------------------------------------------------------------------------|
10
           1            string      No                                             `html`, `htmlall`, `entity`,                                          `html`   This is the escape format to use.
16
| 1                  | string | No       | `html`, `htmlall`, `entity`,                                                                                   | `html`  | This is the escape format to use.                                                                                            |
-
 
17
| 2                  | string | No       | `ISO-8859-1`, `UTF-8`, and any character set supported by [`htmlentities()`](https://www.php.net/htmlentities) | `UTF-8` | The character set encoding passed to html\_entity\_decode() or htmlspecialchars\_decode() or mb\_convert\_encoding() et. al. |
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.
18
 
-
 
19
## Examples
12
 
20
 
13
 
21
```php
14
    <?php
22
<?php
15
 
23
 
16
    $smarty->assign('articleTitle',
24
$smarty->assign('articleTitle',
17
                    "Germans use &quot;&Uuml;mlauts&quot; and pay in &euro;uro"
-
 
18
                    );
-
 
19
 
-
 
20
    ?>
25
                "Germans use &quot;&Uuml;mlauts&quot; and pay in &euro;uro"
Zeile 21... Zeile 26...
21
 
26
                );
Zeile -... Zeile 27...
-
 
27
```
-
 
28
 
-
 
29
These are example `unescape` template lines followed by the output
-
 
30
 
-
 
31
```smarty
-
 
32
{$articleTitle}
-
 
33
Germans use &quot;&Uuml;mlauts&quot; and pay in &euro;uro
-
 
34
 
-
 
35
{$articleTitle|unescape:"html"}
-
 
36
Germans use "&Uuml;mlauts" and pay in &euro;uro
Zeile 22... Zeile -...
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"}
37
 
34
    Germans use "Ümlauts" and pay in €uro
38
{$articleTitle|unescape:"htmlall"}