[wp-hackers] single quote in plugin options
Matt Freedman
speedboxer at gmail.com
Thu Jul 16 02:43:27 UTC 2009
Rather, those quotes are escaped using addslashes(). Sorry for the error.
On Wed, Jul 15, 2009 at 7:42 PM, Matt Freedman<speedboxer at gmail.com> wrote:
> Actually, the quotes are (purposely) added using addslashes() in
> wp-includes/wp-db.php before inserting the data into the database.
>
> Regards,
> Matt Freedman
>
> On Wed, Jul 15, 2009 at 5:40 AM, Will
> Anderson<wp-hackers at itsananderson.com> wrote:
>> 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/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>
>
>
> --
> Matt Freedman
> http://mattfreedman.ca/
>
--
Matt Freedman
http://mattfreedman.ca/
More information about the wp-hackers
mailing list