Template-Semantic icon indicating copy to clipboard operation
Template-Semantic copied to clipboard

UTF/Entities are not handled quite right

Open zostay opened this issue 13 years ago • 1 comments

For example, if you use « and » (« and » in HTML), they will be turned into XML entities and then rendered incorrectly in the browser.

It looks like the reason for this is that serialize() is being used to render XML and then sort of being hacked into HTML. Seems like it might make more sense to use XML::LibXML's toStringHTML() to do that instead.

If I use that on the DOM document inside of Template::Semantic::Document, I get the expected output.

zostay avatar Mar 25 '11 04:03 zostay

I suspect that this problem is related:

$ pmvers Template::Semantic
0.09
$ perl -MTemplate::Semantic
print Template::Semantic->process(
    \'<span>...</span>',
    { 'span' => \'&minus;123.45', },
);
<span>123.45</span>

Lx avatar Apr 10 '13 03:04 Lx