mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
sync with en
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: andreas Status: ready -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: andreas Status: ready -->
|
||||
<sect1 id="language.modifier.escape">
|
||||
<title>escape (Maskieren)</title>
|
||||
<informaltable frame="all">
|
||||
@@ -26,7 +26,7 @@
|
||||
<entry>1</entry>
|
||||
<entry>string</entry>
|
||||
<entry>Nein</entry>
|
||||
<entry>html, htmlall, url, quotes, hex, hexentity</entry>
|
||||
<entry>html, htmlall, url, quotes, hex, hexentity, javascript</entry>
|
||||
<entry>html</entry>
|
||||
<entry>Definiert die zu verwendende Maskierung.</entry>
|
||||
</row>
|
||||
@@ -43,15 +43,20 @@
|
||||
</para>
|
||||
<example>
|
||||
<title>escape (Maskieren)</title>
|
||||
<programlisting>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
index.php:
|
||||
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('TitreArticle', "'Zwei Unbekannte haben im Lidl in Monheim 24 Pakete Kaffee gestohlen.'");
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
index.tpl:
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Wobei im Template folgendes steht:
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
{$artikelTitel}
|
||||
{$artikelTitel|escape}
|
||||
{$artikelTitel|escape:"html"} {* maskiert & " ' < > *}
|
||||
@@ -59,9 +64,13 @@ index.tpl:
|
||||
{$artikelTitel|escape:"url"}
|
||||
{$artikelTitel|escape:"quotes"}
|
||||
<a href="mailto:{$EmailAdresse|escape:"hex"}">{$EmailAdresse|escape:"hexentity"}</a>
|
||||
|
||||
AUSGABE:
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Ausgabe:
|
||||
</para>
|
||||
<screen>
|
||||
<![CDATA[
|
||||
'Zwei Unbekannte haben im Lidl in Monheim 24 Pakete Kaffee gestohlen.'
|
||||
&#039;Zwei Unbekannte haben im Lidl in Monheim 24 Pakete Kaffee gestohlen.&#039;
|
||||
&#039;Zwei Unbekannte haben im Lidl in Monheim 24 Pakete Kaffee gestohlen.&#039;
|
||||
@@ -69,8 +78,13 @@ AUSGABE:
|
||||
%27Zwei+Unbekannte+haben+im+Lidl+in+Monheim+24+Pakete+Kaffee+gestohlen.%27
|
||||
\'Zwei Unbekannte haben im Lidl in Monheim 24 Pakete Kaffee gestohlen.\'
|
||||
<a href="mailto:%62%6f%62%40%6d%65%2e%6e%65%74">&#x62;&#x6f;&#x62;&#x40;&#x6d;&#x65;&#x2e;&#x6e;&#x65;&#x74;</a>
|
||||
</programlisting>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
<para>
|
||||
Siehe auch <link linkend="language.escaping">Smarty Parsing umgehen</link>
|
||||
und <link linkend="tips.obfuscating.email">Verschleierung von E-mail Adressen</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
Reference in New Issue
Block a user