* Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being intersp...
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 4 Jun 2006 02:06:24 +0000 (02:06 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 4 Jun 2006 02:06:24 +0000 (02:06 +0000)
Since this doesn't have larger consequences, I'm checking this in before the bigger Sanitizer parts of the bug 5497 fix.

RELEASE-NOTES
includes/Parser.php

index 7d709a7..066fb10 100644 (file)
@@ -422,6 +422,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6114) Update to Walloon localization (wa)
 * Added $wgNamespaceRobotPolicies to allow customisation of robot policies on a 
   per-namespace basis.
+* Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being
+  interspersed into your ordered lists.
+
 
 == Compatibility ==
 
index e580cc4..e4b9d23 100644 (file)
@@ -1896,10 +1896,10 @@ class Parser
                                wfProfileIn( "$fname-paragraph" );
                                # No prefix (not in list)--go to paragraph mode
                                // XXX: use a stack for nestable elements like span, table and div
-                               $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
+                               $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
                                $closematch = preg_match(
                                        '/(<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
-                                       '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul)/iS', $t );
+                                       '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol)/iS', $t );
                                if ( $openmatch or $closematch ) {
                                        $paragraphStack = false;
                                        # TODO bug 5718: paragraph closed