You are here: RE: Re[2]: [PHP] Problems escaping apostrophe, please help « PHP « IT news, forums, messages
RE: Re[2]: [PHP] Problems escaping apostrophe, please help

Posted by Leila Lappin on 09/28/77 11:18

Hi,

I solved the problem by using htmlspecialchars and passing it ENT_QUOTES.
But I'll try your way as a more general way too. Thanks


-----Original Message-----
From: Tom Rogers [mailto:trogers@kwikin.com]
Sent: Friday, June 10, 2005 8:36 PM
To: php-general@lists.php.net
Cc: Leila Lappin
Subject: Re[2]: [PHP] Problems escaping apostrophe, please help


Hi,

TR> What I do to overcome this is in PHP do:

TR> $content = rawurlencode($content);

TR> and in the html javascript:

TR> unescape("$content");


I didn't do that very well, your code would look something like:

<li>
<a href="#"
onclick='document.form1.how.value=unescape("<?php
rawurlencode($row['how'])?>");
document.form1.factor.value=unescape("<?php
rawurlencode($row['factor']))?>");
document.form1.submit();'><?php htmlentities($row['factor'])?>
</a>
</li>




--
regards,
Tom

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация