update_post_meta removes all slashes
|Reported by:||5ubliminal||Owned by:||nacin|
update_post_meta with a new meta_key forwards the call to update_metadata and then it gets forwarded to add_metadata.
Funny thing is that both functions stripslashes_deep() the meta_value so I kind of remain slash-less in the process.
update_post_meta(1, 'new_meta_key', "x\\\\y"); // Adds 'xy' instead of 'x\y'
Am I missing something? This internal slashes abuse scares me. I can't come up with a fix because this slashes fetish is beyond me.
PS: It happens in 3.1.2 but can't find it in the list.
Change History (15)
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
- Resolution duplicate deleted
- Status changed from closed to reopened
- Version changed from 3.1.1 to 3.3
comment:5 @SergeyBiryukov — 3 years ago
- Milestone set to Awaiting Review
- Version changed from 3.3 to 3.1.1
- Severity changed from blocker to normal
- Keywords has-patch commit added
- Milestone changed from Awaiting Review to 3.3