Page MenuHomePhabricator

Support block element inside link in HTML5
Closed, DuplicatePublic

Description

Wikitext:

[[A|<div style="background:cyan;">aaa</div>]]

Without $wgUseTidy:

<p><a href="/index.php?title=A&amp;action=edit&amp;redlink=1" class=new title=A(页面不存在)>&lt;div style="background:cyan;"&gt;aaa&lt;/div&gt;</a>
</p>

With $wgUseTidy:

<p><a href="/index.php?title=A&amp;action=edit&amp;redlink=1" class="new" title="A(页面不存在)"></a></p>
<div style="background:cyan;">aaa</div>

However in HTML5, this is valid HTML:

<a href="A"><div style="background:cyan;">aaa</div></a>

(which is invalid in HTML4 however)


Version: 1.21.x
Severity: normal

Details

Reference
bz43361

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:03 AM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz43361.
bzimport added a subscriber: Unknown Object (MLST).
liangent created this task.Dec 23 2012, 2:51 PM
Kulla added a subscriber: Kulla.Nov 24 2014, 5:42 PM