Closed Bug 276804 Opened 20 years ago Closed 20 years ago

Paragraph tags plug tag overlap causes unexpected hyperlinks.

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 142771

People

(Reporter: ed, Unassigned)

References

()

Details

Attachments

(2 files)

I've had problems on a few pages with hyperlinks that go to the wrong URL when I click on them. I've distilled one of them down to a sample document. The <b> and <h5> tags overlap the <a> tags. The problem seems to be related to the overlapping tags being inside of the <p>. <html><body> <style> a:link { color : blue } a:hover { color : red } </style> <p> <a href="#Link1"><b><h5>Link 1</a> | <a href="#Link2">Link 2</a></h5></b> </p> Plain text (no link) </body></html> Copy the above HTML to a file and open it in Firefox. What I get is all of the text becomes a hyperlink using the Link 1 URL including the plain text. When I hover over Link 2, both Link 1 and Link 2 get the hover style applied. If you removed the paragraph tags: <html><body> <style> a:link { color : blue } a:hover { color : red } </style> <a href="#Link1"><b><h5>Link 1</a> | <a href="#Link2">Link 2</a></h5></b> Plain text (no link) </body></html> Then the links work just fine and the plain text looks like plain text. For a real-world test page, try http://www.awfulplasticsurgery.com/.
Contains overlapping <b>, <h5> and <a> tags in a <p>.
Contains overlapping <b>, <h5> and <a> tabs NOT in a <p>.
The symptoms of this bug are fixed by the patch in bug 142771, however, the content model of this example is still pretty messed up. I'm not sure if that part of it is a dupe, though, so I'll leave this as unconfirmed.
Depends on: 142771
Actually marking this as a duplicate. *** This bug has been marked as a duplicate of 142771 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
No longer depends on: 142771
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: