Closed Bug 271457 Opened 20 years ago Closed 20 years ago

nested <code> tags do not properly keep track of font to use between <li> tags

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: brian.vincent, Assigned: bugzilla)

References

()

Details

Attachments

(1 file)

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

If you nest <code> tags between unordered lists it won't render the HTML
correctly.  However, nested <code> tags alone work as expected.  Here's some
sample HTML showing the problem (same as the link included with this trouble
report):

<html><body>
<ul><code>
    First we'll indent with &lt;ul&gt; and then use &lt;code&gt; on it. 

	<ul><code>
	This is another &lt;ul&gt; / &lt;code&gt; pair and both tags
	properly closed.  </code></ul>

    That means this text should still be displayed with a fixed-width
    font because we haven't yet closed the first &lt;ul&gt; / &lt;code&gt; pair.
    
</code></ul> 

Second test case... first we use <code> &lt;code&gt; here...
and then we set another <code> &lt;code&gt; here... and then we
close</code> the second one (meaning this should still be fixed-width:
abcdefghijklmnopqrstuvwxyz.)</code>

</body></html>


Reproducible: Always
Steps to Reproduce:
1.  use HTML above
2.
3.

Actual Results:  
rendered incorrectly

Expected Results:  
After closing the second unordered list, it should have continued to use a
fixed-width font.  Granted, this is a somewhat odd case because there should be
no need to open a second <code> tag, however it is perfectly valid HTML.
UL can only contain LI:
http://www.w3.org/TR/REC-html40/struct/lists.html#edef-UL

CODE can only contain %inline elements, which does not include UL:
http://www.w3.org/TR/REC-html40/struct/text.html#edef-CODE

If you want to indent something then use the CSS 'margin' property.
To change the font use the 'font-family' property.
http://www.w3.org/TR/CSS21/propidx.html

-> INVALID
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: