Dumb Quotes

I don't see what's so horrible about Basic ASCII that WordPress had to add "smart quotes" and whatnot. Under your WordPress installation, in wp-includes/functions-formatting.php, there's a "wptexturize" method that has several preg_replace's that change your single- and double-quotes into extended set (unicode even?) characters that perhaps look a bit more professional but also aren't represented in every font out there. I hadn't noticed as Bitstream Vera handles them just fine, but in the interests of globalization, I went ahead and commented out that bit of code.

Thanks to a phpied.com post for this information and a commenter for pointing out WP's folly.

3 Responses to “Dumb Quotes”

  1. jeff Says:

    Smart quotes, done with the proper XML entities, are just fine and fit in great with semantic web standards like XHTML 1.1. Just because some client setups and old, proprietary browsers might not support it doesn't mean you should give up all hope of doing things properly.

    People without western fonts shouldn't expect to be able to read western text properly, just as I wouldn't expect to be able to read Japanese text without Japanese fonts installed. Adding compatibility hacks, whether by falling back to a small subset of characters or by posting images of your text instead of the text itself on your site are a step backwards.

  2. AC Says:

    This is really a problem when you end up with these quote changes in titles if you have an RSS reader that doesn't know what to do with them (firefox's built in RSS reader replaces them with "?").

  3. Robert Dundon "Mr. Bob" Says:

    Meeting a set of standards is not the only requirement of design and usability. Sure, you not only have to follow the letter of the standards, but also the spirit. The W3C standards were put in place to allow cross-compatibility across browsers. Yes, technology should be improved upon, but a good designer needs to address backward-compatibility.

    Also, the Wordpress developers should have built upon post processing and formatting before adding smart/dumb quotes. There should have been either two separate posts stored (i.e. one of (X)HTML and one for RSS) or the smart quotes should have been added using the code that displays the post.

    That's my 3 cents.

Leave a Reply