[wp-hackers] single quote in plugin options

Will Anderson wp-hackers at itsananderson.com
Wed Jul 15 12:40:30 UTC 2009


By the way, those slashes are due to Magic Quotes, a feature that will be
removed in PHP 5.3 and 6. If you want to guard your code against future
releases, or you want to distribute it to people who might have Magic Quotes
disabled (which can be done fairly easily), you'll probably want to check
whether Magic Quotes are enabled before calling stripslashes. here's a good
article on Magic Quotes. At the bottom of the page you'll find a code
snippet that should give you a good idea of how to do this check.

http://www.tizag.com/phpT/php-magic-quotes.php

Best,
Will Anderson
http://www.itsananderson.com/

On Wed, Jul 15, 2009 at 5:56 AM, Daiv Mowbray <daiv at daivmowbray.com> wrote:

>
> Thanx very much Matt,
> stripslashes() is what I needed.
> before display and before using in my javascript.
>
>
> On Jul 15, 2009, at 10:26 AM, Matt Freedman wrote:
>
>  Use stripslashes() before displaying the option.
>>
>
>
> ----------
> Daiv Mowbray
> daiv at daivmowbray.com
> ----------
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Will Anderson
http://www.itsananderson.com/


More information about the wp-hackers mailing list