https://bugzilla.wikimedia.org/show_bug.cgi?id=24835

           Summary: Compatibility anchors cause unnecessary <p> tags
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Page rendering
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: entli...@gmx-topmail.de


The compatibility anchors inserted when a header contains special characters
are wrapped in <p> tags. The wikitext

== áàâ ==

is rendered as

<p><a id=".C3.A1.C3.A0.C3.A2" name=".C3.A1.C3.A0.C3.A2"></a></p>
<h2><span class="mw-headline" id="áàâ">áàâ</span></h2>

Why are the <p> tags there? Probably because only block elements are allowed as
children of the bodytext. But these paragraphs can affect rendering because
they have top and bottom margins (which happen to collapse with other margins
most of the times, but not necessarily always).

I'd prefer one of the following:

<div id=".C3.A1.C3.A0.C3.A2"></div>
<h2><span class="mw-headline" id="áàâ">áàâ</span></h2>

or

<h2><a id=".C3.A1.C3.A0.C3.A2" name=".C3.A1.C3.A0.C3.A2"></a>
<span class="mw-headline" id="áàâ">áàâ</span></h2>

Besides that, I don't see a reason for the name attribute? It is not valid in
HTML5 (looks quite odd if something that has been added because of HTML5 breaks
validation) and only needed by browsers of the Netscape 4 era. The real headers
don't have named anchors either, so that's rather pointless.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to