For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > May 2005 > [PEAR][QUICKFORM] Freeze









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [PEAR][QUICKFORM] Freeze
Obsessed

2005-05-27, 8:56 am

Hi,

I'm creating a page that let people make newsposts.
After the first submit I want them to get a page with a preview of their
submitted item, and then they can submit it or go back and alter it.

I'm displaying the preview by using freeze() on my form.
This works very nicely but I only have on problem.
If users used html in their post to give it some layout, I'm getting
those tags in the preview as text instead of them 'working' if you know
what I mean.

Is there any way to display correct html in form elements while in
frozen state?
Or any good alternative for this problem?

Thanks in advance
Justin Patrin

2005-05-27, 4:00 pm

On 5/20/05, Obsessed <Obsessed@dayofdefeat.be> wrote:
> Hi,
>=20
> I'm creating a page that let people make newsposts.
> After the first submit I want them to get a page with a preview of their
> submitted item, and then they can submit it or go back and alter it.
>=20
> I'm displaying the preview by using freeze() on my form.
> This works very nicely but I only have on problem.
> If users used html in their post to give it some layout, I'm getting
> those tags in the preview as text instead of them 'working' if you know
> what I mean.


This is as it should be. The text is run through htmlentities to make
sure that what you typed is what you see. This is also done in order
to stop XSS attacks.

If you want to display the posted data as HTML and not text, you'll
have to output it yourself.

>=20
> Is there any way to display correct html in form elements while in
> frozen state?
> Or any good alternative for this problem?
>=20
> Thanks in advance
>=20



--=20
Justin Patrin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com