#7346 closed defect (bug) (duplicate)
using custom fields interjects back-slash?
Reported by: | Lilith70 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
When I use custom fields (latest_home_image and thumb_home_image) to format and display images from the Flickr account, back-slashes \ are interjected in front of every quotation mark, rendering the code useless unless edited by hand. Luckily, this does work using the Update button, but it's not exactly convenient.
Attachments (1)
Change History (6)
#2
@
16 years ago
I'll try to take a look at this when I get time. If it's a bug, it would be nice to have a patch before 2.7 is put into freeze.
#3
@
16 years ago
I can confirm that this bug occurs in WP 2.6.2.
When adding a custom field to a post, if the field's value contains an apostrophe or quotation mark (' or "), slashes are added to the wp_postmeta record.
There must be an extra addslashes() call somewhere before the INSERT statement.
Updating an existing custom field's value does not add extra slashes.
I can confirm experiencing this problem with all versions since 2.6.
To recreate, type any value in a new custom field that includes single or double-quotes (' or "). When it is saved, it will be saved with a preceding backslash
' becomes \'
" becomes \"
It's pretty annoying, and only just began with version 2.6.