[wp-trac] [WordPress Trac] #2572: Two apostrophes become an
apostrophe and a right single quote
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 15 13:44:04 GMT 2006
#2572: Two apostrophes become an apostrophe and a right single quote
---------------------+------------------------------------------------------
Id: 2572 | Status: new
Component: General | Modified: Wed Mar 15 13:44:04 2006
Severity: normal | Milestone:
Priority: normal | Version: 2.0.2
Owner: ryan | Reporter: rdparker
---------------------+------------------------------------------------------
There is a bug in the quoting mechanism of functions-formatting.php.
{{{
``Hated'' is the right word,
}}}
for example, becomes
{{{
“Hated'’ is the right word,
}}}
instead of
{{{
“Hated” is the right word,
}}}
This is caused by the
{{{
$curl = preg_replace("/'([\s.]|\Z)/", '’$1', $curl);
}}}
substitution in functions-formatting.php. If there were a comma after the
second apostrophe, then the issue would be caused by
{{{
$curl = preg_replace("/(\S)'([^'\s])/", "$1’$2", $curl);
}}}
I cannot think of a time when apostrophe followed by a right single quote
would be the desired action so my local fix was to move the double-
apostrophe rule to be right after the double-grave rule. I will try to
attach a patch for this.
--
Ticket URL: <http://trac.wordpress.org/ticket/2572>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list