[Bps-public-commit] r11934 - in HTML-RewriteResources: .
sartak at bestpractical.com
sartak at bestpractical.com
Mon Apr 28 20:41:42 EDT 2008
Author: sartak
Date: Mon Apr 28 20:41:40 2008
New Revision: 11934
Modified:
HTML-RewriteResources/ (props changed)
HTML-RewriteResources/Makefile.PL
HTML-RewriteResources/lib/HTML/RewriteAttributes.pm
Log:
r54614 at onn: sartak | 2008-04-28 20:41:34 -0400
Use HTML::Entities for encoding attribute values
Modified: HTML-RewriteResources/Makefile.PL
==============================================================================
--- HTML-RewriteResources/Makefile.PL (original)
+++ HTML-RewriteResources/Makefile.PL Mon Apr 28 20:41:40 2008
@@ -5,6 +5,7 @@
all_from 'lib/HTML/RewriteResources.pm';
requires 'HTML::Parser';
+requires 'HTML::Entities';
WriteAll;
Modified: HTML-RewriteResources/lib/HTML/RewriteAttributes.pm
==============================================================================
--- HTML-RewriteResources/lib/HTML/RewriteAttributes.pm (original)
+++ HTML-RewriteResources/lib/HTML/RewriteAttributes.pm Mon Apr 28 20:41:40 2008
@@ -4,6 +4,7 @@
use warnings;
use base 'HTML::Parser';
use Carp 'croak';
+use HTML::Entities 'encode_entities';
our $VERSION = '0.01';
@@ -67,8 +68,7 @@
$self->{rewrite_html} .= sprintf ' %s="%s"',
$attr,
- #_escape($attrs->{$attr}),
- $attrs->{$attr};
+ encode_entities($attrs->{$attr});
}
$self->{rewrite_html} .= ' /' if $attrs->{'/'};
More information about the Bps-public-commit
mailing list