﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
4556,Fancy quotes broken inside parentheses,bglickstein,anonymous,"If I put text in plain quotes inside of parentheses (""like this""), Wordpress mistranslates the quotes into curly quotes.  I have a simple patch against wp-includes/formatting.php (tag 2.2.1, revision 5735) that should fix this.  It makes open-parens (and open-brackets) ""transparent"" to left curly quotes, and close-parens (and close-brackets) ""transparent"" to right curly quotes.

Cheers,[[BR]]
- Bob

{{{
Index: formatting.php
===================================================================
--- formatting.php	(revision 5772)
+++ formatting.php	(working copy)
@@ -20,8 +20,8 @@
 	$static_characters = array_merge(array('---', ' -- ', '--', 'xn&#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 
 	$static_replacements = array_merge(array('&#8212;', ' &#8212; ', '&#8211;', 'xn--', '&#8230;', '&#8220;', '&#8217;s', '&#8221;', ' &#8482;'), $cockneyreplace);
 
-	$dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/(\s|\A|"")\'/', '/(\d+)""/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)""(?!\s)/', '/""(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
-	$dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1&#8220;$2', '&#8221;$1', '&#8217;$1', '$1&#215;$2');
+	$dynamic_characters = array('/\'(\d\d(?:&#8217;|\')?s)/', '/(\s|\A|"")\'/', '/(\d+)""/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)([\[(]*)""(?!\s)/', '/""([\])]*)(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
+	$dynamic_replacements = array('&#8217;$1','$1&#8216;', '$1&#8243;', '$1&#8242;', '$1&#8217;$2', '$1$2&#8220;$3', '&#8221;$1$2', '&#8217;$1', '$1&#215;$2');
 
 	for ( $i = 0; $i < $stop; $i++ ) {
  		$curl = $textarr[$i];
}}}",defect (bug),closed,normal,,General,2.2,minor,duplicate,,
