Created
February 28, 2013 09:36
-
-
Save chuckreynolds/5055517 to your computer and use it in GitHub Desktop.
SQL Statement Replace Smart Curly Quotes with Regular Quotes in WordPress.
I was migrating an old wp site with a ton of content I noticed a lot of curly quotes / smart quotes and the curly single quotes. My OCD hates that and it's not proper and looks bad to bots so I wanted to batch change them all to regular ascii quotes. This statement handle…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_posts SET post_content = replace(replace(replace(post_content, '“', '"'), '”', '"'), '’', ''''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks. It actually kinda grieves me to make use of this; "correct" typography uses curly quotes, but in my case a self-hosted search engine chokes on them.