[wp-hackers] slashes in custom field input

DD32 wordpress at dd32.id.au
Fri Sep 19 10:53:25 GMT 2008

Quick question:
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  
the slashes?

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  
> of
> 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  
> use
> 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
> anymore.
> Has anyone else noticed this?
> --
> Rick Beckman
> http://rickbeckman.org/
> http://fellowship-hall.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list