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, '<',
-# '>' and '&', respectively.
+# Convert any '<', '>', '&' or '"' characters to the HTML equivalents,
+# '<', '>', '&' and '"', respectively.
#------------------------------------------------------------------------
sub html_filter {
@@ -1047,9 +1047,9 @@
=head2 html
-Converts the characters 'E<lt>', 'E<gt>' and '&' to '<', '>' and
-'&', respectively, protecting them from being interpreted as
-representing HTML tags or entities.
+Converts the characters 'E<lt>', 'E<gt>', '&' and '"' to '<', '>',
+'"' and '&', respectively, protecting them from being interpreted
+as representing HTML tags or entities.
[% FILTER html %]
Binary "<=>" returns -1, 0, or 1 depending on...