summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-01-15 20:10:48 +0100
committerDerek Jones <derek.jones@ellislab.com>2009-01-15 20:10:48 +0100
commit232484c0c7ec9987459851039c2e2d14578ec133 (patch)
tree2614177e097132b660d8e7f5f3337fae327b03a7
parente4702126ca8ee01714a13b0ed1df3b7adcd8b63f (diff)
Fixed a bug when an opening quote is preceded by a paragraph tag and immediately followed by another tag.
-rw-r--r--system/libraries/Typography.php8
-rw-r--r--user_guide/changelog.html1
2 files changed, 5 insertions, 4 deletions
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 11b3917c0..1ae45774a 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -267,23 +267,23 @@ class CI_Typography {
// on which direction to curl, with non-word characters like punctuation
// being a secondary factor only after whitespace is addressed.
'/\'"(\s|$)/' => '&#8217;&#8221;$1',
- '/(^|\s)\'"/' => '$1&#8216;&#8220;',
+ '/(^|\s|<p>)\'"/' => '$1&#8216;&#8220;',
'/\'"(\W)/' => '&#8217;&#8221;$1',
'/(\W)\'"/' => '$1&#8216;&#8220;',
'/"\'(\s|$)/' => '&#8221;&#8217;$1',
- '/(^|\s)"\'/' => '$1&#8220;&#8216;',
+ '/(^|\s|<p>)"\'/' => '$1&#8220;&#8216;',
'/"\'(\W)/' => '&#8221;&#8217;$1',
'/(\W)"\'/' => '$1&#8220;&#8216;',
// single quote smart quotes
'/\'(\s|$)/' => '&#8217;$1',
- '/(^|\s)\'/' => '$1&#8216;',
+ '/(^|\s|<p>)\'/' => '$1&#8216;',
'/\'(\W)/' => '&#8217;$1',
'/(\W)\'/' => '$1&#8216;',
// double quote smart quotes
'/"(\s|$)/' => '&#8221;$1',
- '/(^|\s)"/' => '$1&#8220;',
+ '/(^|\s|<p>)"/' => '$1&#8220;',
'/"(\W)/' => '&#8221;$1',
'/(\W)"/' => '$1&#8220;',
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 9de2b1fae..245f218c5 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -100,6 +100,7 @@ SVN Revision: </p>
<li>Fixed a bug where HTML comments and &lt;pre&gt; tags were being parsed in Typography::auto_typography().</li>
<li>Fixed a bug with non-breaking space cleanup in Typography::auto_typography().</li>
<li>Fixed a bug in database escaping where a compound statement (ie: SUM()) wasn't handled correctly with database prefixes.</li>
+ <li>Fixed a bug when an opening quote is preceded by a paragraph tag and immediately followed by another tag.</li>
<li>Tweaked Typography::auto_typography() for some edge-cases.</li>
</ul>