Closed Bug 293692 Opened 20 years ago Closed 20 years ago

getElementsByTagName("a") is confused by shorthand closed anchor tag

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 135425

People

(Reporter: stim2119, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

When using a shorthand closed anchor tag, (e.g. <a href="#" />) the function
document.getElementsByTagName("a") returns more elements than it should. Using
<a href="#"></a> instead does not cause the same problem. See test case. 

Reproducible: Always

Steps to Reproduce:
1. Run test case
2.
3.

Actual Results:  
alert box reported "7"

Expected Results:  
should report "1"
Attached file Test case
You can't use XML rules unless the document is served with an XML mimetype, see
Bug 135425.

*** This bug has been marked as a duplicate of 135425 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Summary: getElementsByTagName("a") is confused by shorthand closed anchor tag → getElementsByTagName("a") is confused by shorthand closed anchor tag
Attachment #183258 - Attachment mime type: text/plain → application/xhtml+xml
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: