bioneural.net site preferences

Accessibility

Toggle width/ text size:

style

Default/Alternate

Suits visual impairment, mobile devices

Styling

Change the theme:

layout

NB: may reduce functionality

Link behaviour

Links with an icon are off-site:

links

Right-click any link to optionally open in a new window or tab


Stop WordPress character replacements

Is WordPress altering your punctuation behind your back e.g. converting typewriter quotes (") to smart quotes (“ & ”)? It's down to the on-by-default wptexturize function. You can disable this by adding the following to your theme's functions.php file: remove_filter('the_content', 'wptexturize'); (for posts) and remove_filter('comment_text', 'wptexturize'); (for comments). Or, use a plugin.

2 responses to “Stop WordPress character replacements”


  1. Comment 1 Rob

    Hmm, could this be why my update of MySQL resulted in a bunch of odd Unicode characters?

  2. Comment 2 Bruce

    No, this isn't the problem (for certain). Looking at your source Rob I see your blog's character set is set to utf-8, which should handle entities. When comparing files during my WP upgrade I noticed two extra lines in wp-config-sample.php—which weren't there in my older config.php file. I have read that deleting these two lines (define('DB_CHARSET', 'utf8'); and define('DB_COLLATE', '');) if you edited them in, or did an automatic upgrade, can resolve problems. Maybe try that if you see these lines in your config file? See the Warning for those performing upgrades. Also, at the phpMyAdmin login screen, is your language reported as English (utf-8)?

Something to say?

Comments may be moderated (e.g. no commercial promotion), are subject to spam filtering, and should be relevant to this post—otherwise make contact.

Usable tags include <a href=""> <blockquote> <em>. Select any text and click to quote.