[Pmwiki-users] htmlspecialchars($Text)?

Patrick R. Michaud pmichaud
Mon Mar 15 15:20:38 CST 2004


On Mon, Mar 15, 2004 at 03:36:02PM +0100, Thomas -Balu- Walter wrote:
> 
> is there an internal variable for htmlspecialchars($Text)? already? :-)

No, not yet.  I've wanted to introduce one but it's always introduced
too many upgrade hassles so I've avoided it thus far.

> I wanted to add a second form in the preview part to have a save button
> below it too, but I need a hidden field for "text". And this one needs
> to have the html special chars quoted.
> Before creating $Text_ myself I was wondering if there is one already or
> if I need to watch for something special.

Well, the biggest thing to watch out for is that by using a hidden field
to store the text, you may get some user surprise if/when they modify
the text in the text area but use the submit button after the preview
(which would submit the unmodified text in the hidden field).

Another approach might be to see if there's some way to cause the 
edit <form ...> to extend to include the preview content--i.e., to
have the closing </form> tag come after the page preview.  Then any
save buttons could refer to the edit fields as well.

Pm




More information about the pmwiki-users mailing list