Re: Re: Quickform Textarea and htmlspecialchars
| From: | Bertrand Mansion | Date: | Thu, 20 Feb 2003 16:20:37 +0000 |
| Subject: | Re: Re: Quickform Textarea and htmlspecialchars | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-3865@lists.php.net to get a copy of this message | ||
<ths@4bconsult.de> wrote :
> Dan Wilson schrieb in php.pear.general:
>
>> So I have a form element that is supposed to be several URLs... so when
>> I freeze the form, I would like a URL converted to an hyperlink so it
>> is then clickable.
>
> I think freeze() is not the solution what you want.
> freeze() is IMHO for showing exactly what the user typed in.
That's right.
>> Here's my problem... the textarea automatically does an
>> htmlspecialchars call in the toHTML function. I really don't want that
>> so I can convert that into HTML for display purposes only (once the
>> form is submitted).
>
> You can use a filter (take a look at QuickForm_example5.php) or
> manipulate the submitted Values $form->getSubmitValue('my_textarea')
> directly and print them as and where you like.
Or even, use toArray() and make your own layout based on that.
>> I think that call to htmlspecialchars should be optional... perhaps
>> make it a filter or some sort, but it should not be mandatory on a
>> textarea.
>
> IMHO it is a bug, that currently htmlspecialchars() is not also used when
> freeze() text-Elements ;-)
That's fixed now, htmlspecialchars() is used in every elements.
Bertrand Mansion
Mamasam