Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Tag::displayTo utf8 encoding is not correct!

Tag::displayTo('name','你好'); output below: 西安立免&#x7f51 This is not the result i wanted.



83.0k
Accepted
answer

Data is automatically escaped preventing XSS attacks, if you want to disable it is up to you

Phalcon\Tag::setAutoescape(false);


19.4k

I ran into this issue today. I'm using UTF-8 strings and it doesn't do a good job with non-ascii characters. I had to turn off auto escape. Which function is being used for escaping? Characters like á à é ó ú all become �. Why is that?