adobe / htlengine

An HTL (Sightly) Interpreter/Compiler for Node.js
Apache License 2.0
47 stars 20 forks source link

Standard meta tags wrongly escaped inside "simple2.html" file #315

Open kele23 opened 3 years ago

kele23 commented 3 years ago

Hi All! I think there is an error in file "simple2.html" (test/templates/simple2.html) that invalidates the result of some tests like "Engine Test".

I notice that for test case "Engine Test" you compare the compilation of "simple2.htl" with the "simple2.html". But if I do a manual comparison of the two files I can see a very interesting difference in some meta tags of the page.

     >> FILE simple2.html
      -    <meta http-equiv="X-UA-Compatible" content="IE&#x3d;edge"/>
      -    <meta name="viewport" content="width&#x3d;device-width, initial-scale&#x3d;1"/>
      -    <meta name="title" content="Hello, world&#x21;"/>

      >> FILE simple2.htl
      +    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
      +    <meta name="viewport" content="width=device-width, initial-scale=1"/>
      +    <meta name="title" content="Hello, world!"/>

Maybe I missing something, but why standard meta are escaped? They are not inside an HTL context. shouldn't they be kept as they are in "simple2.htl" file?

Thanks M

tripodsan commented 3 years ago

they are in the attribute context which escapes all potential problematic characters.

tripodsan commented 3 years ago

@kele23 is this a problem?

kele23 commented 3 years ago

Hi @tripodsan, For the browser is not a problem to handle this characters, but I think is quite strange to escape also these attributes. For me the correct behavior is to keep these attributes as they are in the original htl file, like HTL on AEM does.

Thanks. M