Subject: | TT2 emulation FILTER html should not convert ' to ' |
Date: | Tue, 20 Oct 2009 12:17:10 -0700 |
To: | bug-Template-Alloy [...] rt.cpan.org |
From: | Ashley Pond V <ashley.pond.v [...] gmail.com> |
Template::Alloy 1.013
In TT2 the html filter does not touch apostrophes. This is the correct
behavior and ' is not even a real entity name though it is almost
universally supported by browsers. The exception being, of course, the
albatross known as IE6.
This is what I've hacked to get the right behavior in my own Alloy code:
Template::Alloy->define_vmethod(
'text',
html => sub {
HTML::Entities::encode_entities(+shift, '<>&"');
},
);
I'm not sure where the right place to fix it in the real code base is. :(
Alloy is *teh awsum*. Thank you for your work on it!
-Ashley