Closed Bug 281074 Opened 20 years ago Closed 20 years ago

firefox does not close a self closing anchor tag (<a />) even tho it validates xhtml 1.0

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 162653

People

(Reporter: seele, Assigned: bugzilla)

Details

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 When using a self closing anchor tag, usually used for creating page anchors to sections (ex: <a name="sec1" />) FF 1.0 does not close the anchor. This makes following content part of the anchor and has the potential to make non anchor elements display wrong. This may be a Gecko problem. Reproducible: Always Steps to Reproduce: 1. Create an xhtml 1.0 template 2. add this code (or something similar): <h1><a name="sec1" />Text</h1> 3. Actual Results: "Text" will become a link even tho the anchor has closed. Expected Results: Closed the anchor.
<a /> does not close the element in HTML. If you look at the Type in View->Page Info, it says "text/html", right?
Attachment #173374 - Attachment mime type: text/html → application/xhtml+xml
Attachment #173374 - Attachment mime type: application/xhtml+xml → text/html
sending the attachemnt as application/xhtml+xml just plain doesn't work for said testcase. If you send as html, we handle as HTML, which means that you can't close the element as with xhtml.
Try using: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> and serve it as "application/xhtml+xml", then it works?
Attached file Same example as XHTML (deleted) —
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
so if i want to use the transitional dtd it remains broken.
Resolution: INVALID → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: