r14563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14562‎ | r14563 | r14564 >
Date:02:06, 4 June 2006
Author:brion
Status:old
Tags:
Comment:
* Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being interspersed into your ordered lists.
Since this doesn't have larger consequences, I'm checking this in before the bigger Sanitizer parts of the bug 5497 fix.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Parser.php
@@ -1896,10 +1896,10 @@
18971897 wfProfileIn( "$fname-paragraph" );
18981898 # No prefix (not in list)--go to paragraph mode
18991899 // XXX: use a stack for nestable elements like span, table and div
1900 - $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
 1900+ $openmatch = preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<ol|<li|<\\/tr|<\\/td|<\\/th)/iS', $t );
19011901 $closematch = preg_match(
19021902 '/(<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\\/h6|'.
1903 - '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul)/iS', $t );
 1903+ '<td|<th|<div|<\\/div|<hr|<\\/pre|<\\/p|'.$this->mUniqPrefix.'-pre|<\\/li|<\\/ul|<\\/ol)/iS', $t );
19041904 if ( $openmatch or $closematch ) {
19051905 $paragraphStack = false;
19061906 # TODO bug 5718: paragraph closed
Index: trunk/phase3/RELEASE-NOTES
@@ -422,7 +422,10 @@
423423 * (bug 6114) Update to Walloon localization (wa)
424424 * Added $wgNamespaceRobotPolicies to allow customisation of robot policies on a
425425 per-namespace basis.
 426+* Add <ol> to the list of block elements for doBlockLevels; avoids <p>s being
 427+ interspersed into your ordered lists.
426428
 429+
427430 == Compatibility ==
428431
429432 MediaWiki 1.7 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.

Follow-up revisions

RevisionCommit summaryAuthorDate
r19801Add a mechanism to parserTests when run in --compare or --record mode, to giv...nickj06:59, 6 February 2007

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r13851Fix bug 5497: Regression in HTML normalization in 1.6 (unclosed <li>)...hashar19:25, 24 April 2006
r13852BACKPORT from trunk:...hashar19:29, 24 April 2006
r14045Parser test cases for bug 5497brion00:24, 3 May 2006
r14046Parser test cases for bug 5497brion00:25, 3 May 2006
r14047adjust notes: * Rolled back the buggy patch for bug 5497brion00:29, 3 May 2006

Status & tagging log