cvs: smarty / NEWS Smarty.class.php /docs designers.sgml /plugins modifier.escape.php

From: Date: Thu, 04 Apr 2002 20:34:44 +0000
Subject: cvs: smarty / NEWS Smarty.class.php /docs designers.sgml /plugins modifier.escape.php
Groups: php.smarty.cvs 
Request: Send a blank email to php-smarty-cvs+get-18@lists.php.net to get a copy of this message
mohrt Thu Apr 4 15:34:44 2002 EDT Modified files: /smarty NEWS Smarty.class.php /smarty/docs designers.sgml /smarty/plugins modifier.escape.php Log: added htmlall attribute to escape modifier Index: smarty/NEWS diff -u smarty/NEWS:1.183 smarty/NEWS:1.184 --- smarty/NEWS:1.183 Wed Apr 3 14:31:10 2002 +++ smarty/NEWS Thu Apr 4 15:34:43 2002 @@ -1,3 +1,4 @@ + - added htmlall attribute to escape (Monte) - added template_exists() API function. (Andrei) - fixed a problem with using dynamic values for 'file' attribute of {include_php} tag. (Andrei) Index: smarty/Smarty.class.php diff -u smarty/Smarty.class.php:1.260 smarty/Smarty.class.php:1.261 --- smarty/Smarty.class.php:1.260 Wed Apr 3 14:31:11 2002 +++ smarty/Smarty.class.php Thu Apr 4 15:34:43 2002 @@ -741,6 +741,7 @@ /* * Find out if the resource exists. */ + $readable = true; if ($resource_type == 'file' && !@is_file($resource_name)) { $readable = false; Index: smarty/docs/designers.sgml diff -u smarty/docs/designers.sgml:1.18 smarty/docs/designers.sgml:1.19 --- smarty/docs/designers.sgml:1.18 Fri Mar 22 18:07:00 2002 +++ smarty/docs/designers.sgml Thu Apr 4 15:34:44 2002 @@ -669,19 +669,20 @@ </tgroup> </informaltable> <para> - This is used to html escape, url escape, escape single quotes on a - variable not already escaped, hex escape or hexentity escape. hex - and hexentity escape can be used in conjunction to hide "mailto:" - links on a page from web spiders (spam collectors) and yet keep - them readable and linkable. By default, the variable is html - escaped. + This is used to html (or htmlall) escape, url escape, escape single + quotes on a variable not already escaped, hex escape or hexentity + escape. hex and hexentity escape can be used in conjunction to hide + "mailto:" links on a page from web spiders (spam collectors) and + yet keep them readable and linkable. By default, the variable is + html escaped. </para> <example> <title>escape</title> <programlisting> {$articleTitle} {$articleTitle|escape} -{$articleTitle|escape:"html"} +{$articleTitle|escape:"html"} {* escapes &amp; &quot; &#039; &lt; &gt; *} +{$articleTitle|escape:"htmlall"} {* escapes ALL html entities *} {$articleTitle|escape:"url"} {$articleTitle|escape:"quotes"} &lt;a Index: smarty/plugins/modifier.escape.php diff -u smarty/plugins/modifier.escape.php:1.3 smarty/plugins/modifier.escape.php:1.4 --- smarty/plugins/modifier.escape.php:1.3 Wed Feb 20 17:24:32 2002 +++ smarty/plugins/modifier.escape.php Thu Apr 4 15:34:44 2002 @@ -14,6 +14,9 @@ case 'html': return htmlspecialchars($string, ENT_QUOTES); + case 'htmlall': + return htmlentities($string, ENT_QUOTES); + case 'url': return urlencode($string);

« previous php.smarty.cvs (#18) next »