mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 10:24:26 +02:00
update docs
This commit is contained in:
38
docs.sgml
38
docs.sgml
@@ -6687,6 +6687,44 @@ index.tpl
|
||||
Stock Name: {$ticker_name} Stock Price: {$ticker_price}</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<sect1>
|
||||
<title>Obfuscating E-mail Addresses</title>
|
||||
<para>
|
||||
Do you ever wonder how your E-mail address gets on so many spam mailing
|
||||
lists? One way spammers collect E-mail addresses is from web pages. To
|
||||
help combat this problem, you can make your E-mail address show up in a
|
||||
scrambled looking form in the HTML source, yet it it will look and work
|
||||
correctly in the browser. This is done with the escape modifier.
|
||||
</para>
|
||||
<example>
|
||||
<title>Example of Obfuscating an E-mail Address</title>
|
||||
<programlisting>
|
||||
|
||||
index.tpl
|
||||
---------
|
||||
|
||||
Send inquiries to
|
||||
<a href="mailto:{$EmailAddress|escape:"hex"}>{$EmailAddress|escape:"hexentity"}</a>
|
||||
|
||||
OUTPUT:
|
||||
|
||||
Send inquiries to
|
||||
<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>
|
||||
</example>
|
||||
<para>
|
||||
Although this looks like a mess in the HTML source, it will render
|
||||
correctly in your browser, and the mailto: hyperlink will go to the correct
|
||||
address.
|
||||
</para>
|
||||
<para>
|
||||
TECHNICAL NOTE: Of course this isn't 100% foolproof. Although highly unlikely, a
|
||||
spammer could conceivably write his e-mail collecter to decode these
|
||||
values.
|
||||
</para>
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter id="resources">
|
||||
<title>Resources</title>
|
||||
|
Reference in New Issue
Block a user