Closed Bug 1288940 Opened 9 years ago Closed 9 years ago

self-closing <a/> tag is duplicated

Categories

(Core :: DOM: HTML Parser, defect)

47 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: hans2020dieter, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160623154057 Steps to reproduce: I wrote html code and found a Bug. My aim was it to code two a-tags with a circle-border. Actual results: The left a-tag got an okay circle-border, but the right a-tag got a non-Anti-aliased border (it doesent looks as smooth as the left a-tag). Expected results: Both a-tags should look like the same, because both got the same css information. But I found out where the Bug comes from. My a-tag looks like this: '<a id="a" href="" />'. If you replace the ' />' at the and of the tag with: '></a>', so that it looks like this:'<a id="a" href=""></a>', then all is fine. But please fix the Bug, because this '/>' is much faster and easier.
OS: Unspecified → All
Hardware: Unspecified → All
Whiteboard: Anti-aliasing Bug a tag
Comment on attachment 8774086 [details] a-tag_Anti-aliasing_Bug.zip see the "a-tag_Anti-aliasing_Bug.zip"!
It's not an issue on anti-aliasing. There are 2 right circles, because of the corrupted markup, and it results in drawing the right circle twice at the same place, and the edge becomes harder. You can see the actual tree in Inspector, that looks like following: <body> <div> <a id="a" href=""></a> <a id="b" href=""></a> </div> <a id="b" href=""></a> </body> That is because, "a" cannot be a self-closing tag, per HTML5 spec. https://html.spec.whatwg.org/multipage/syntax.html#start-tags > 12.1.2.1 Start tags > ... > 6. Then, if the element is one of the void elements, or if the element is > a foreign element, then there may be a single U+002F SOLIDUS character (/). > This character has no effect on void elements, but on foreign elements it > marks the start tag as self-closing. https://html.spec.whatwg.org/multipage/syntax.html#void-elements > Void elements > area, base, br, col, embed, hr, img, input, keygen, link, meta, param, > source, track, wbr https://html.spec.whatwg.org/multipage/syntax.html#foreign-elements > Foreign elements > Elements from the MathML namespace and the SVG namespace. To use self-closing tag there, you'll need to use XHTML instead. This might be a compat issue per HTML4 spec, as self-closing tag is also valid markup in SGML. But they recommend to avoid using such features. https://www.w3.org/TR/html4/appendix/notes.html#sgmlfeatures > B.3.3 SGML features with limited support > SGML systems conforming to [ISO8879] are expected to recognize a number of > features that aren't widely supported by HTML user agents. We recommend that > authors avoid using all of these features. Also, other browsers (Chrome, WebKit, Edge, IE11) also parse the HTML file as there are 2 right circles. So I think this bug is simply INVALID. Moving to HTML::Parser component just in case.
Component: Untriaged → HTML: Parser
Product: Firefox → Core
Summary: a tag: Anti-aliasing Bug while end tag with ... /> → self-closing <a/> tag is duplicated
Whiteboard: Anti-aliasing Bug a tag
Thanks for the report and the thorough analysis!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: