Page MenuHomePhabricator

section edit links have problems with HTML header markup
Closed, ResolvedPublic

Description

Author: davegates

Description:
The section parameter of the side "edit" links counts only sections where the
header is visible on the TOC (headers formatted with "==", "===", etc.)
Thus, the "edit" link after the section headed "Keeping headings out of the
Table of Contents" edits the wrong area, as that section contains a header that
is not on the TOC (formatted with "<h2>", "<h3>", etc.)


Version: unspecified
Severity: normal
URL: http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page

Details

Reference
bz966

Event Timeline

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

rowan.collins wrote:

To be honest, I'd say that the "trick" being used to keep these headers out of
the ToC is itself a bug, and that a heading should be a heading and no cheating
by using a different kind of markup.

However, there does seem to be a long-standing problem with the section edit
code, where the code which inserts "[edit]" links is divorced from the code
which counts the sections for "&section=X" edits. (See also, for example, bug
904, which appears to have been fixed). Without looking at the code, I'd guess
this is because "section counting" isn't done while parsing, but adding the
"[edit]" links is; I wonder if there's some way the counting *could* be done in
the "proper" parser, or made more structurally similar.

rowan.collins wrote:

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

jeluf wrote:

There's a space added before the closing bracket during processing of </h1> HTML
tags.
Changed the regexp in CVS HEAD to also match </h1 >. Some simple test cases have
been solved by this.

Article.php, rev 1.368

zigger wrote:

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

avarab wrote:

*** This bug has been marked as a duplicate of 2128 ***