Ah, curly quotes. They look nice, but they’re also such a pain if you display code on your blog, or copy/paste it from another blog. Here’s a very simple recipe that I urge you to use if you display code on your blog. Your readers will say thanks you!






















27 Responses
Damn! I was looking for that sinces months! Thank you Mr Kitty^^
You just saved me lots of headaches! Thanks for the nice tip!
That’s a hack that I’m very pleased to apply.
Thank you.
I agree this curly quotes are weird. Specially when someone copies a post edited while TinnyMCE was on or was written in application like MS Word…
Thanks for sharing.
@J Mehmett: Yeah, curly quotes are a big problem for anyone who display code on his/her blog, and more especially for people who copy it. It has been a source of many errors!
Nice hack, thank you for share.
Thank U…
i will try it
How can same quotes can be removed from comments area? Should I put comment_text in the brackets?
When i try this, I get the following error.
Parse error: syntax error, unexpected ‘<’ in
The error won’t go away until I FTP over a backup of the functions file - I can’t just delete the offending line from the functions file. Any theories …?
You know when you ask a question, and then you find the answer straight away … Anyway, dunno if it’s a 2.7 thing, but you don’t seem to need the <php at the front. So you just need:
remove_filter(’the_content’, ‘wptexturize’);
remove_filter(’comment_text’, ‘wptexturize’);
I still didn’t understand
how to use it?
Trackbacks: