Last modified: 2010-05-15 15:51:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12309, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10309 - Section editing confused by <pre> tags
Section editing confused by <pre> tags
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.10.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 10570 10776 (view as bug list)
Depends on:
Blocks: 4899
  Show dependency treegraph
 
Reported: 2007-06-19 06:18 UTC by Nathanael
Modified: 2010-05-15 15:51 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Nathanael 2007-06-19 06:18:44 UTC
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.
Comment 1 Brion Vibber 2007-06-19 16:00:59 UTC
Fixed in r23101 by adding a clearState() call to ensure things are set up. Test cases added in r23100.
Comment 2 Brion Vibber 2007-07-13 18:55:39 UTC
*** Bug 10570 has been marked as a duplicate of this bug. ***
Comment 3 Brion Vibber 2007-08-08 17:28:10 UTC
*** Bug 10776 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links