We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Tag::textField() breaks some UTF-8 characters

echo Phalcon\Tag::textField(['test', 'value'=>'ó Ó Ą Ś Ł Ż Ź Ć Ń ą ę ó ą ś ł ż ź ć ń']); // BUGGY
echo $this->escaper->escapeHtml('Ó ó'); // WORKS OK

Why does Phalcon encode legal UTF-8 characters in form inputs? I think only < > " ' & should be escaped.

Ó and ó are always broken. When you send request and get the form back, other characters may break too.

If you use internal htmlspecialchars() function, remember about setting 3rd parameter to UTF-8.

When you use Form classes, Element::render() calls Tag helpers so field values are broken.


Could you please post this as a bug?

Similar bug already exists so I posted a comment: