Oh boy, another update to WordPress, another set of changes to the WordPress core to prevent WordPress from changing the default double dash and single quote characters to the “pretty” HTML versions ’, ‘, –, —, …
When posting snippets of source code or command line arguments, having the quotes and dashes replaced makes copy/pasting the commands a pain, as your terminal won’t recognise them.
So, if you want to fix that in WordPress 3.3, edit the /wp-includes/formatting.php file and go to around line 61. You’ll see something like this.
function wptexturize($text) {
....
$static_characters = array_merge(...
$static_replacements = array_merge(...
$dynamic_characters = array(...
$dynamic_replacements = array(...
...
}
Right below those 4 PHP variables, add the following lines.
// Just ignore everything from above
$static_characters = array();
$static_replacements = array();
$dynamic_characters = array();
$dynamic_replacements = array();
That simply overwrites whatever WordPress had defined to be replaced, to leave it at the default HTML characters.
If you’ve done that above, the file should look similar to the screenshot below.