Closed Bug 171494 Opened 23 years ago Closed 23 years ago

<a name> within <li> inserts an extra newline

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 100930

People

(Reporter: morpheus, Assigned: harishd)

Details

Attachments

(1 file)

The following html snippet displays with an extra newline: <a name="foo" /> <ul> <li><a name="bar">test</a></li> </ul>
Attached testcase exhibiting the problem.
This is not valid HTML. You have: <a> <ul> <li> <a> test </a> </li> </ul> So you have nested <a> tags. If you look at the DOM the parser generates out of this "html", you will see that the text is not even inside the <li> (closing out the outer <a> also closes out the <li>, it seems). Layout is absolutely correct given that content model.
Assignee: attinasi → harishd
Component: Layout → Parser
QA Contact: petersen → moied
Hmm... I see. Eventhough that first <a> element is properly ended? I have <a name="foo" />, not <a name="foo">.
morpheus: the tag is _only_ properly closed if you send the file as text/xml or application/xhtml+xml or application/xml. in all other cases, the /> is no closing of a tag.
*** This bug has been marked as a duplicate of 100930 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: