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


Author: mohr.42

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:

Version: unspecified
Severity: minor

bzimport set Reference to bz9156.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 3 2007, 1:42 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

ayg wrote:

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

ayg wrote:

Fixed in r21950.

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

Reverted r21950

brion added a comment.May 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.

Changed bug title. Similar to bug 11911.

Add Comment