Re: [SMARTY] newbie: Escaped variables in form textareas??

From: Date: Mon, 01 Jul 2002 17:09:00 +0000
Subject: Re: [SMARTY] newbie: Escaped variables in form textareas??
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5124@lists.php.net to get a copy of this message
You need to run PHP's stripslashes function on the form data. Either do it in the application or, if this isn't possible, write a Smarty modifier to wrap stripslashes. Ben On Monday, July 1, 2002, at 05:51 , Avern Williams wrote:
Hi, I have a textarea field for comments in a web form. If there is no problem with the form, then the comment gets entered into a database and is immediately display in an html page (this part works fine). However, if there is a problem with the form, I've asked a smarty template to redisplay the form, showing the visitor's original comment as the default value in the comment field. The problem is that if their comment has a quote character, then the backslashes show up when the form is redisplayed. I know the backslashes normally help the quotes to be displayed properly, but is there a way to have smarty show the comments variable without the backslashes? thanks, Avern _________________________________________________________________ Join the worldís largest e-mail service with MSN Hotmail. http://www.hotmail.com -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.smarty.general (#5124) next »