Page MenuHomePhabricator

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

Description

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 ==
Content
</div>

Version: unspecified
Severity: enhancement

Details

Reference
bz58541

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 https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1514

brion added a comment.Dec 19 2013, 7:01 PM

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.

MaxSem added a comment.Aug 4 2014, 6:05 PM
  • Bug 69104 has been marked as a duplicate of this bug. ***

A prominent example of this bug can be found on https://m.wikimediafoundation.org/wiki/Terms_of_Use (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.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 18 2015, 9:45 AM
MaxSem removed a subscriber: MaxSem.Dec 18 2015, 10:35 AM
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.

ssastry updated the task description. (Show Details)Jul 20 2017, 8:25 PM