Closed Bug 1590 Opened 26 years ago Closed

<p> tags inside links result in an extra line break

Categories

(Core :: Layout, defect, P2)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: cpratt, Assigned: rickg)

References

Details

To see this, write the following HTML: <html><body><p>This <a href="http://www.w3.org">is a <p>link</a> you can click.</body></html> What you see when this is displayed is wrong - you get an extra line break after the end of the href, instead of continuing the text on that line.
Summary: Links with <p> tags in them brewak incorrectly → <p> tags inside links result in an extra line break
batch-reassigning all Garrett Blythe bugs to Don Melton
Assignee: don → troy
Re-assigned to troy@netscape.com. Troy, is this a layout bug?
Assignee: troy → kipp
Displayed wrong in NGLayout, too
*** Bug 1589 has been marked as a duplicate of this bug. ***
This looks like a parser problem. I hesitate to call it a bug, because the HTML is invalid. Look at the effects of the following code. If the first p or li has display: none, then both end up not displayed. If the second p or li has display: none, the only the part of the link in that p or li is not displayed. Adding rickg to cc: list (and myself). <html><body> <div style="color: red;"> <p>This <a href="http://www.w3.org">is a <p style="display: none;">link</a> you can click. </div> <div style="color: green"> <p style="display: none;">This <a href="http://www.w3.org">is a <p>link</a> you can click. </div> <div style="color: black;"> <p>This <a href="http://www.w3.org">is a <p>link</a> you can click. </div> <ul style="color: purple"> <li style="display: none">This <a href="http://www.w3.org">is a <li>link</a> you can click. </ul> <ul style="color: blue"> <li>This <a href="http://www.w3.org">is a <li style="display: none;">link</a> you can click. </ul> <ul style="color: green"> <li>This <a href="http://www.w3.org">is a <li>link</a> you can click. </ul> </body></html>
Setting all current Open/Normal to M4.
Component: Windows FE → Layout
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Assignee: kipp → rickg
Status: ASSIGNED → NEW
The initial bug report is wrong; we layout the content properly. The subsequent data from dbaron exposes a parser bug with this portion of the content: <ul style="color: purple"> <li style="display: none">This <a href="http://www.w3.org">is a <li>link</a> you can click. </ul> The second list item ends up inside the first one instead of closing out the prior one (and the A element).
Status: NEW → ASSIGNED
Corrected by changes to parsing engine.
Status: RESOLVED → VERIFIED
Fixed in 5/17 build.
You need to log in before you can comment on or make changes to this bug.