[wp-hackers] slashes in custom field input
wordpress at dd32.id.au
Fri Sep 19 10:53:25 GMT 2008
Are you saying that the output from attribute_escape() ends up with ' "
and & with slashes? Or that the raw output from get_post_meta() contains
On Fri, 19 Sep 2008 20:48:02 +1000, Rick Beckman <rick.beckman at gmail.com>
> I'm attempting to use custom fields to handle post descriptions instead
> installing one of a thousand SEO plugins to do it, and while the theme
> output mechanism was dead-simple for even a lightweight like me to put
> together, I notice that whenever I add a custom field, the value that is
> saved has slashes added to entities such as ", ', and &.
> I'm already attribute_escape()ing the custom field output so that I can
> quotes and ampersands within it without it breaking my HTML.
> It seems like WP should be stripping the slashes added by what I can only
> assume is the Ajax mechanism for first adding the field to a post.
> Subsquently editing and saving the value doesn't seem to add slashes
> Has anyone else noticed this?
> Rick Beckman
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers