• Resolved deko

    (@deko)


    There is only one key on my keyboard with quotes. Why is this little mark such a big problem?

    Apparently someone had bright idea to add some “magic” to these benign little things and now we have a pile crap that doesn’t render consistently.

    In the WordPress post editor, the quotes I enter always appear as they do on my keyboard, straight and narrow. But when I view my post in a browser, they appear as curly (or smart or magic or whatever heck you want to call them).

    Is there anyway around this? I’ve tried using ' and &qout; but these get rendered literally in IE.

    Another problem is that WP’s conversion of single quotes is ‘sometimes’ inaccurate. (Backward single quote on sometimes will appear in normal WP posts.)

Viewing 10 replies - 1 through 10 (of 10 total)
  • WPChina

    (@wordpresschina)

    Yes, there is a great solution that will make all the magic go away. Download the wpuntexturize plugin from this link: http://www.coffee2code.com/wp-plugins/

    Thread Starter deko

    (@deko)

    Thanks for the tip. I’ll check it out (and also find out how to disable wptexturize at the source). You would think the WP folks would include a simple checkbox option to use or not use this feature. Even MS allows users to disable this feature in Word…

    WPChina

    (@wordpresschina)

    Ah, where does MS have this feature in Word?! I’ve been looking for it for a loooooong time…

    Yes, I agree that there is absolutely no reason for magic_quotes and they create problems not only in WP but in so many other online and offline apps. A big pain in the neck…. I too has searching for this plugin and someone was nice enough to point me to it a few months ago 🙂

    Thread Starter deko

    (@deko)

    In Word 2003, go to Tools > AutoCorrect Options… and you will see the AutoCorrect dialog with 5 different tabs – it’s on the AutoFormat tab, I think. I turn off just about everything in this dialog.

    Thread Starter deko

    (@deko)

    From the notes on wpuntexturize:

    Basically, wptexturize() (located in /wp-includes/functions-formatting.php), performs certain character and text replacements that I’m not too groovy with, namely this ( ‘ ) being replaced with ( ) or ( &#8217 ), and ( ” ) being replaced with ( ) or ( ). I appreciate the other character and text replacements that were happening, just not those.

    I figure I’ll just modify the code in functions-formatting.php. I’m not at all hesitant to modify WP core files – I do it all the time and effectively have created my own version. I call it 2.deko 🙂

    By the way, Alex King has a plug-in – WP Unformatted – that will turn off “texturization” on a per-post basis:

    http://www.alexking.org/index.php?content=software/wordpress/content.php

    Thanks for pointing that out in the notes, deko. I’ve modified my core-files too, only problem is the changes tend to get replaced during upgrades ~ so I have to remember everything I wanted to hack.

    I’m probably going to implement this change (turn of magic quotes), the fuctions-formattting.php way. Have you verified success with this method yet & could share which line and how much to delete?

    Thread Starter deko

    (@deko)

    I’m sure it’s dirt easy, but I haven’t looked yet. I’m using Alex King’s plug-in for now as a quick fix.

    As an aside, I think the backward single quote in situations like ‘sample’ is a bug. Apparently they coded it so anytime a single quote is followed by an ‘s’ it’s converted to a right-handed single quote.

    This whole quote mess is like original sin. I didn’t eat the apple, but I’m the one sweating for it. Whoever introduced those funky quotes should be made to fix every information system in the world that gets screwed up by them.

    You’re right about upgrades – I maintain an annotated list of all my core mods and re-implement them after an upgrade. It’s a pain, but the safest approach, I think. Perhaps this site has a database of WP core hacks that users have submitted? It would be interesting to see what folks are doing…

    fckeditor has a useful tool for removing all Word formatting. It would be nice if WordPress incorporated something like this. Have a look at their demo(s):
    http://www.fckeditor.net/

    the plugin (mine) “Visualize Advanced Features” has a paste from Word button.

    Apparently someone had bright idea to add some “magic” to these benign little things and now we have a pile crap that doesn’t render consistently.

    I’m sorry for saying virtually nothing here, but that statement made me smile. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to prevent automatic conversion of quotes?’ is closed to new replies.