Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 13522
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: qef [...] ungwe.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.14
Fixed in: (no value)



Subject: Documentation of html_filter slightly wrong [PATCH]
The comments and POD in lib/Template/Filters.pm are slightly inaccurate for the 'html_filter' function. They say that [<>&] are escaped, but in fact '"' is also escaped. This causes me a little unnecessary concern that my HTML attribute values wouldn't be right. I've attached a patch to correct this. qef
--- lib/Template/Filters.pm.orig 2005-07-04 09:06:06.075786011 +0100 +++ lib/Template/Filters.pm 2005-07-04 09:08:44.181719557 +0100 @@ -286,8 +286,8 @@ #------------------------------------------------------------------------ # html_filter() [% FILTER html %] # -# Convert any '<', '>' or '&' characters to the HTML equivalents, '&lt;', -# '&gt;' and '&amp;', respectively. +# Convert any '<', '>', '&' or '"' characters to the HTML equivalents, +# '&lt;', '&gt;', '&amp;' and '&quot;', respectively. #------------------------------------------------------------------------ sub html_filter { @@ -1047,9 +1047,9 @@ =head2 html -Converts the characters 'E<lt>', 'E<gt>' and '&' to '&lt;', '&gt;' and -'&amp;', respectively, protecting them from being interpreted as -representing HTML tags or entities. +Converts the characters 'E<lt>', 'E<gt>', '&' and '"' to '&lt;', '&gt;', +'&quot;' and '&amp;', respectively, protecting them from being interpreted +as representing HTML tags or entities. [% FILTER html %] Binary "<=>" returns -1, 0, or 1 depending on...
Fixed in the soon-to-be-released v2.15 Thanks A