If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED INVALID

Status

()

Firefox
General
RESOLVED INVALID
13 years ago
13 years ago

People

(Reporter: Brian Vincent, Assigned: Blake Ross)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
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.
(Reporter)

Comment 1

13 years ago
Created attachment 166879 [details]
test case as an HTML file

Comment 2

13 years ago
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
Last Resolved: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.