[wp-hackers] single quote in plugin options

Daiv Mowbray daiv at daivmowbray.com
Wed Jul 15 08:09:05 UTC 2009


Hello List.

I am trying to find a solution.
My problem is: an option in one of my plugins includes single quotes.
for example, text field contains: 'href', 'rel', 'rev', 'title'
however, when saving the options,
the field now contains: \'href\', \'rel\', \'rev\', \'title\'
when I save the options a second time,
the field now contains: \\\'href\\\', \\\'rel\\\', \\\'rev\\\', \\ 
\'title\\\'

In my options form, I have tried to use :
echo attribute_escape($Options['myfield']);

I don't want to escape the single quotes, I want them to stay as
entered: 'href', 'rel', 'rev', 'title'

Any pointers greatly appreciated.

----------
Daiv Mowbray
daiv at daivmowbray.com
----------




More information about the wp-hackers mailing list