[Pmwiki-users] htmlspecialchars($Text)?
Thomas -Balu- Walter
list+pmwiki-users
Mon Mar 15 16:17:03 CST 2004
On Mon, Mar 15, 2004 at 03:20:34PM -0700, Patrick R. Michaud wrote:
> 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).
Of course. I forgot about that... So it's really a bad idea :-).
> 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.
I was thinking of something like this too:
Now I am doing in local/config.php (in fact in pub/skins/balu/balu.php
that is to be loaded from there :)):
$unextendedForm = '</form>';
if ($preview) $unextendedForm = '';
And in my template file I just have a </form> at the end of the preview
part and use the $unextendedForm after the editarea.
This way the form will extend to the end of the preview part if preview
is active.
Balu
More information about the pmwiki-users
mailing list