Invalid heading markup made valid by template expansion, causes ghost section
Closed, ResolvedPublic

Description

Author: mohr.42

Description:
If you create a heading as such:

Section 1=={{template}}

and then have

Section 2

Clicking the "edit" link for "Section 1" brings up an editor for "Section 2",
not "Section 1".

I found this on an article and removed fixed the offending formatting, but
recreated it on my user page:

http://en.wikipedia.org/wiki/User:Mohrr


Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/wiki/User:Mohrr

bzimport added a project: MediaWiki-Page-editing.Via ConduitNov 21 2014, 9:36 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz9156.
bzimport created this task.Via LegacyMar 3 2007, 1:42 AM
bzimport added a comment.Via ConduitMar 4 2007, 1:31 AM

ayg wrote:

Proposed patch

The problem is in Parser::extractSections, pretty much as expected: the regex
doesn't like non-whitespace on the same line as a wikitext header. Patch
probably fixes it, but I haven't tested it, since PHP broke when I tried to
install 5.2 locally and I haven't had time to fix it.

Attached: 9156a.patch

bzimport added a comment.Via ConduitMay 7 2007, 12:47 AM

ayg wrote:

*** Bug 9815 has been marked as a duplicate of this bug. ***

bzimport added a comment.Via ConduitMay 7 2007, 1:06 AM

ayg wrote:

Fixed in r21950.

brion added a comment.Via ConduitMay 8 2007, 3:12 PM

Reverted r21950

brion added a comment.Via ConduitMay 8 2007, 3:13 PM

There is indeed not supposed to be anything else on the same line as a heading.
The bug is that some constructions end up internally stripping that data from
the line so it ends up getting incorrectly processed for display as though it
were valid input.

tstarling added a comment.Via ConduitNov 13 2007, 10:24 AM

Changed bug title. Similar to bug 11911.

Add Comment