[PHP] Re: How to escape in hidden field?

2002-09-02 Thread Erwin

Martin Thoma wrote:
 Hello!

 I have a simple hidden input-field like
 INPUT TYPE=HIDDEN VALUE=Hello world NAME=Message

 Now sometimes I need to insert  like:

 INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
 But this makes PHP (or the browser?) cutting of the string after
 Hello . How can I escape the ?

Using the htmlspecialchars() function, so that Hello \world\ will be
written in pure HTML: Hello quot;worldquot;

HTH
Erwin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: How to escape in hidden field?

2002-09-02 Thread Martin Thoma

 Using the htmlspecialchars() function, so that Hello \world\ will be
 written in pure HTML: Hello quot;worldquot;

Thanx a lot! But how do I get it back to 'Hello world'? Do I have to do it
manually?

Martin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: How to escape in hidden field?

2002-09-02 Thread Steel

Hi Martin,

Monday, September 2, 2002, 2:21:10 PM, ß ïîëó÷èë:

 Using the htmlspecialchars() function, so that Hello \world\ will be
 written in pure HTML: Hello quot;worldquot;

MT Thanx a lot! But how do I get it back to 'Hello world'? Do I have to do it
MT manually?

MT Martin

Yep. But you can use some Regexp features.
EX:
$string = preg_replace(/\$quot/,\,Hello quot;worldquot;);


-- 
The Same,
 Steelmailto:[EMAIL PROTECTED]
   http://www.none.ru


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: How to escape in hidden field?

2002-09-02 Thread nicos

Hi,
Its really stupid to use that command because there is not any function
to come back to the real way. You should just addslashes() to it then remove
them.

--
Merci de nous avoir choisi. - Thanks you for your choice.
Nicos - CHAILLAN Nicolas
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.GroupAKT.com - Hebergement Group.
www.WorldAKT.com - Hebergement de sites Internet
Steel [EMAIL PROTECTED] a ecrit dans le message de news:
[EMAIL PROTECTED]
 Hi Martin,

 Monday, September 2, 2002, 2:21:10 PM, ß ïîëó÷èë:

  Using the htmlspecialchars() function, so that Hello \world\ will
be
  written in pure HTML: Hello quot;worldquot;

 MT Thanx a lot! But how do I get it back to 'Hello world'? Do I have to
do it
 MT manually?

 MT Martin

 Yep. But you can use some Regexp features.
 EX:
 $string = preg_replace(/\$quot/,\,Hello quot;worldquot;);


 --
 The Same,
  Steelmailto:[EMAIL PROTECTED]
http://www.none.ru




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: How to escape in hidden field?

2002-09-02 Thread Martin Thoma

 Hi,
 Its really stupid to use that command because there is not any function
 to come back to the real way. You should just addslashes() to it then remove
 them.

Hi Nicos,

unfortunalty, it doesn't work to use stripslashes: When using:
INPUT TYPE=HIDDEN VALUE=Hello \world\ NAME=Message
(which is the same the stripslashes would produce), the field gets the value
Hello .

Martin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php