Unbastardization of the Apostrophe

This may seem like a dumb thing to a lot of people, but it's something that has been bugging me for a long time. Not bugging me very much, but it keeps popping up.

WordPress has this feature where it makes text look nice with an internal function called wptexturize(). One of the functions buried inside it is to translate plain quotes to smart quotes — ideally it's supposed to make "this" render like “this” and "it's" render like "it’s".

But it's kind of dumb. I frequently trick it because I want to emphasize the name of an artist in the midst of a possessive with the name of the work. So I put in "Jason Olshefsky's" which renders "Jason Olshefsky‘s" and I end up fixating on that friggin' backward apostrophe. (It's clear to me the problem is wptexturize() doesn't take into account HTML tagging in the middle of a word.)

So this guy Scott Reilly wrote a nice little plug-in (overzealously) called wpuntexturize. Despite its name, it just removes the quote-mangling functionality from wptexturize(). And voila. The whole site now has plain old straight quotes and apostrophes.

362 total views, no views today