Last modified: 2014-10-12 19:44:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73962, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71962 - When Tidy is enabled, wikitext like [[Link|<div>Text</div>]] will not actually produce a clickable link
When Tidy is enabled, wikitext like [[Link|<div>Text</div>]] will not actuall...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: tidy 9737
  Show dependency treegraph
 
Reported: 2014-10-11 19:00 UTC by Bartosz Dziewoński
Modified: 2014-10-12 19:44 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bartosz Dziewoński 2014-10-11 19:00:09 UTC
When Tidy is enabled, wikitext like [[Link|<div>Text</div>]] will not actually produce a clickable link. That's because Tidy "unwraps" the <div/> outside of the <a/> tag.

I believe this is pretty much common knowledge, but it seems we have no bug filed for it and there clearly aren't enough Tidy-related bugs filed if no one has killed it yet.
Comment 1 Bartosz Dziewoński 2014-10-11 19:00:38 UTC
The workaround is to use [[Link|<span style="display: block;">Text</span>]], as stupid as that looks.
Comment 2 Erwin Dokter 2014-10-11 20:32:48 UTC
Tidy's first rule is not to allow block-level elements inside an inline-level element. This bug describes what Tidy is supposed to do, albeit not what is desired. Not going to be fixed, because Tidy isn't HTML5-aware and hasn't been maintained since 2008.

The only solution is to switch to Tidy-html5 [1] (an experimental fork), or make its functionality part of parsoid. Either way, bug 54617 deals with updating/upgrading Tidy.

[1] https://github.com/w3c/tidy-html5
Comment 3 Bartosz Dziewoński 2014-10-11 20:53:32 UTC
<a/> is not an inline element, it's a transparent element [1]. It was an inline element according to HTML 4 spec [2], but as far as I know no browser ever implemented it as such (even IE 6 happily allows block content in links). This is indeed an aspect of Tidy's incompatibility with HTML 5.

I don't think this deserves a WONTFIX any more than the other dozens of blockers to bug 2542 do.

[1] http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element
[2] http://www.w3.org/TR/html401/struct/links.html#h-12.2
Comment 4 Erwin Dokter 2014-10-12 07:07:50 UTC
Wontfix, cantfix... the point is, there is no fix, save replacing the legacy Tidy. So how about marking all Tidy bugs dependent/duplicate of bug 54617?
Comment 5 Bartosz Dziewoński 2014-10-12 12:16:39 UTC
Many of these could probably be worked around in MediaWiki if someone put in the necessary effort.
Comment 6 Erwin Dokter 2014-10-12 19:44:22 UTC
That would be an inordinate ammount of effort... Let's be realistic and just upgrade to Tidy-html5.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links