-
Notifications
You must be signed in to change notification settings - Fork 61
HTML-ENTITIES encoding replace UTF-8 in meta tags #180
Comments
@petranek80 can you write a test case that demonstrates the regression, please? |
e.g. after downgrade to 2.10.0 is back normal, UTF-8 encodings
|
@petranek80 that's not a problem, since the HTML parser will pick up those characters anyway? |
I saw the same as I wanted to check my meta description and OpenGraph information. It's not very easy to read when looking at the source code in the browser. The reason for that behavior is https://github.com/zendframework/zend-view/pull/164/files. But as you can see there is an option for auto escpaping. I'm now using the following for the output (in my phtml file for the layout:
But you can also use the setAutoEscape method earlier. Unfortunately you can use setAutoEscape() for headMeta(), but it has no effect, because |
same here! Not sure it is a problem for search engine crawlers to detect the content properly |
Please check the HTML code in the developer tools of your browser. |
Can you create a new issue report for this problem? Thanks! |
Please don't do that, unless you are 100% sure that none of the |
Crawlers are based on the parsed HTML structure, not on the raw strings: not affected. |
OK we should downgrade zend-view now. Thanx |
@lexxur why would you need to? |
If your ie is set to compatibility mode and you want to send Can anyone confirm? As a workaround I send |
I can confirm this behaviour in IE11. The following content doesn't work:
And this works:
|
Ok. I just give you some glue: we need to escape just quotes (both, single and double), triangle brackets (<, >) and utf-8 symbols (just in case). Seems like that's enough. |
I'd first check with @padraic about that. |
@DennisDobslaf I can confirm the bad behaviour for echo $this->headMeta()->appendHttpEquiv('X-UA-Compatible', 'IE=edge,chrome=1'); Before the update the output was: <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> After the update the output is: <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> Althought the latter may be the correct form of representing this tag (with https://github.com/zendframework/zend-escaper/blob/master/src/Escaper.php#L231 according to https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet ) it simply doesn't work 😞 Source: a thousand bank users our app is serving every day that called us mad about our broken app 😃 (issue reproduced and verified) |
Fixed with #182, and version 2.11.2. |
After updating zendframework/zend-view (2.10.0 => 2.11.1) meta tags have HTML-ENTITIES encoding instead of UTF-8
e.g.
after downgrade to 2.10.0 is back normal, UTF-8 encodings
The text was updated successfully, but these errors were encountered: