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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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...
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
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: ---


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.

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.

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.