Page MenuHomePhabricator

Cannot wrap sections in DIV due to section collapsing
Closed, InvalidPublic


With the following wikitext sample the content in 4 does not get a yellow background and blue border.

== foo ==
== 2 ==
=== 3 ===
<div style="background: yellow; border: 1px solid blue;">
== 4 ==

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:26 AM
bzimport set Reference to bz58541.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

Prioritization and scheduling of this bug is tracked on Mingle card

Note that the given code was never intended to work in our section model, since it puts the start of the div in one section and the end in another.

But such machinations are not uncommon because there's no automatic section wrapping on desktop, or provision for styling sections at all, and people sometimes want to be able to style them.

It would perhaps not be unreasonable to sniff backwards for unclosed block tags like a <div> just before section boundaries and switch which bit belongs where -- but note this could get "interesting" with section editing etc.

There are 2 different issues here: weird collapsing which is a minor problem and sections inside diffs not having edit links - this one is more serious.

Hmm, looks like edit links work OK, kicking the card back to backlog.

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

A prominent example of this bug can be found on (this page is linked in the footer of every page on every project, and hence receives a lot of traffic):

The sections "13. Disputes and Jurisdiction", "14. Disclaimers", "15. Limitation on Liability" appear in the TOC, but not in the list of collapsed sections, because of a div surrounding them.

Jdlrobson changed the task status from Duplicate to Invalid.Apr 13 2017, 8:12 PM
Jdlrobson closed this task as a duplicate of T114072: <section> tags for MediaWiki sections.

Yup. This is a limitation of the current approach. Use <section> tags would have to consider this.