Skip Menu |

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

Report information
The Basics
Id: 40870
Status: resolved
Worked: 20 min
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: MOREGAN [...] cpan.org
Cc:
AdminCc:

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



Subject: 2.20 html_entity filter always uses HTML::Entities due to bug
Template::Filters::html_entity_filter_factory broke in 2.20. A reworked eval references the non-existent Apache::Utils package, rather than Apache::Util: sub html_entity_filter_factory { my $context = shift; my $haz; # if Apache::Util is installed then we use escape_html $haz = $AVAILABLE->{ HTML_ENTITY } ||= eval { require Apache::Util; Apache::Utils::escape_html(''); \&Apache::Util::escape_html } ... So the check for Apache::Util never succeeds, and TT always uses HTML::Entities. Apache::Util::escape_html() and HTML::Entities::encode_entities() are not identical in behavior for the single quote character ("'") at least, and our tests started failing.
Bug fixed, thanks. Also added Template::Filters class methods use_html_entities() and use_apache_util() to explicitly use one or other module. http://template-toolkit.org/svnweb/Template2/revision/?rev=1177