summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-12-31 04:01:38 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-12-31 04:01:38 +0000
commit9ff2c1b3a8c5fcbf656cc744f210fc37f16a5075 (patch)
treef0a10036507872928b074675bb95b794b3f7fcc8
parent46c681417d48107f5343412ea16aeec1d6126570 (diff)
downloadbrdo-9ff2c1b3a8c5fcbf656cc744f210fc37f16a5075.tar.gz
brdo-9ff2c1b3a8c5fcbf656cc744f210fc37f16a5075.tar.bz2
- #42828: Auto-p destroys alphanumeric named entities like &frac12;
-rw-r--r--modules/filter.module2
-rw-r--r--modules/filter/filter.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/filter.module b/modules/filter.module
index 2aa7398fe..c12f54c11 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -1034,7 +1034,7 @@ function _filter_autop($text) {
$chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); // make line breaks
$chunk = preg_replace('!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br />!', "$1", $chunk);
$chunk = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $chunk);
- $chunk = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&amp;$1', $chunk);
+ $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&amp;$1', $chunk);
}
$output .= $chunk;
}
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 2aa7398fe..c12f54c11 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -1034,7 +1034,7 @@ function _filter_autop($text) {
$chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); // make line breaks
$chunk = preg_replace('!(</?(?:table|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)\s*<br />!', "$1", $chunk);
$chunk = preg_replace('!<br />(\s*</?(?:p|li|div|th|pre|td|ul|ol)>)!', '$1', $chunk);
- $chunk = preg_replace('/&([^#])(?![a-z]{1,8};)/', '&amp;$1', $chunk);
+ $chunk = preg_replace('/&([^#])(?![A-Za-z0-9]{1,8};)/', '&amp;$1', $chunk);
}
$output .= $chunk;
}