Question about TMPL_VAR and ESCAPE=HTML

When using content such as ñ and a Chinese character like “字” they display just 
fine in the browser when we use a tag like:

<!— TMPL_VAR NAME —>



However, if we use:

<!— TMPL_VAR NAME ESCAPE=“HTML” —>

the values do not display as their character but rather the HTML encoded value:




According to the documentation of HTML::Template escape HTML should only escape 
5 characters:

        Replaces the following characters with their HTML entity equivalent: &, 
", ', <, >

However, it appears that it is doing more than just replacing those 5 
characters with their HTML entity equivalent. It seems to be changing UTF-8 
characters as well.


When calling HTML::Template->new() we are specifying:

        utf8 => 1

The server is sending a Content-Type header of text/html; charset=UTF-8 and we 
also employ the meta-tag for specifying the charset.

The HTML for the input tag looks like this:

<input type=“text” name=“middlename” value=“<!— TMPL_VAR NAME=‘middlename’ 
ESCAPE=HTML—>” title=“Middle Name” />

Is this expected behavior?  Is there a work-around?  At this point the only 
solution I see is to do my own escaping of just any double quotes and then use 
the value in my TMPL_VAR without HTML escaping.

By the way, we’ve been using HTML::Template for years and it’s become a key 
part of our software.  We appreciate all that’s been done with it so far.

— Mark
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to