Page MenuHomePhabricator

Section editing confused by <pre> tags
Closed, ResolvedPublic

Description

Author: mediawiki

Description:
Using Mediawiki 1.10.0 I have found that section editing can go awry when there is a <pre> tag containing ===== preceding the section being edited. For example:

Section One

<pre>

</pre>

Section Two

stuff

Performing an edit on Section Two by replacing "stuff" with "more stuff" results in:

Section One

<pre>

Section Two

more stuff

Section Two

stuff

I believe the cause of this is that at the time Parser::strip is invoked during Article::replaceSection the wgParser object has not been initialised by Parser::firstCallInit. As a result, Parser::mTagHooks does not contain the pre hook and so <pre> tags are not being stripped and the section counting is thrown off.


Version: 1.10.x
Severity: normal

Details

Reference
bz10309

Related Objects

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:54 PM
bzimport set Reference to bz10309.
bzimport added a subscriber: Unknown Object (MLST).

Fixed in r23101 by adding a clearState() call to ensure things are set up. Test cases added in r23100.

  • Bug 10570 has been marked as a duplicate of this bug. ***
  • Bug 10776 has been marked as a duplicate of this bug. ***