WordPress Oct 5, 2026
6 min read
wp_update_post() eats your backslashes
Two WP-CLI scripts rewrote 78 posts on this site. 69 came back exactly as planned. The other 9 lost every literal backslash they had, including the string interpolation in two Swift tutorials, and nothing reported an error. wp_update_post() expects slashed input and unslashes whatever it is given.