Could you please elaborate a little. Why do want all the 8bit
characters entities-encoded in the first place? It is perfectly normal
for HTML to contain latin1 characters if there's a charset META or HTTP
header (which you will need regardless of whether you encode entities
* Dave W. Smith <dws@...> [October 19 2004, 08:18]:
> We ran headlong into the need to add iso-8859-1 (Latin1) support to a large
> webapp that used over a hundred templates. Rather than tracking down the
> many places where we stuffed parameters, then modify them to use
> HTML::Entities (and remove "ESCAPE=HTML"), I took the "simplest thing that
> could possibly work" path, and added an 'encode_entities' option to new().
> When true, it causes 7-bit unclean characters to be escaped via
> HTML::Entities::encode_entities() when "ESCAPE=HTML" is used.
> With the patch, getting most of the way to Latin1 support was a simple as
> my $template = HTML::Template->new(
> filename => $template,
> global_vars => 1,
> cache => 1,
> + encode_entities => 1,
> The performance hit (for the encode_entities => 1 case) is < 1% for our app,
> as measured via our unit test suite.
> The patch for HTML::Template 2.7, including doc changes and unit tests, is
> To maintain backward compatibility for people who expect single-quotes to be
> escaped (e.g., for existing unit tests), single quotes are escaped either