Double htmlspecialchars in forms

Notice: This thread is very old.
Wessel
Member | 1
+
0
-

Hello,

I am using Nette for a project and have run into a problem.

When using the AppForm and the label contains a ‘&’ it appears that htmlspecialchars is done twice. '&' appears in the source as & and the browser interprets this as &

I am guessing that htmlspecialchars is applied once in the form component and again in the html table component.

This is how I create the input:

<?php
$form = new AppForm($this, $name);
$form->addText('firstlastname', 'firstname & lastname')
?>

and this is how I call it in the template:
{!$form}
it makes no difference using ! or not.

I have tried this in a couple of our forms and they all show the same behaviour.

Because my Czech language skills are not very good, it is hard for me to search the forums and documentation, although I tried.

How can I fix this?

Thanks.

php version 5.2.11
Nette version: 464 released on 2009/07/24 17:52:50

LM
Member | 206
+
0
-

Try using newer version https://nette.org/en/packages.