[wp-hackers] The \ problem in posts

Zarniwoop florian.jung at gmail.com
Mon Jun 28 09:34:47 UTC 2004


I had the same problem but for the curious there's a simpler solution
than hand-editing all your posts. Please have a look at phpmyadmin if
it supports all the mentioned steps (newer version do).

0. Make a complete backup of your database before you go on.
1. Take phpmyadmin and export the posts table (wp_posts) as SQL.
2. Make a backup of this file, if anything goes wrong.
3. Open the file with your preferred text editor and do some search and replace.
   Replace `\\\'` with `\'` (single quotes)
   Replace `\\\"` with `\"` (double quotes)
   Replace `\\\` with `\` (backslashes)
   Take care when there are lots of backslashes and eventually correct
them later when
   you're back in WP.
4. Back to phpmyadmin, delete the posts table.
5. Select the database (not a single table) and go to the tab called
"SQL". There should
   be a button called "Browse..." where you can select the modified
file. When you click
   on "Ok" it will create the posts table and import all the changes
you've made.
6. Have a look at the posts if all has gone right. (Titles would need
some changes also).



More information about the hackers mailing list