Closed Bug 81823 Opened 21 years ago Closed 21 years ago

<link rel=STYLESHEET href=foo.css> is not loaded (upper case)

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: jrgmorrison, Assigned: peterv)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

If an external stylesheet is declared with the 'rel' attribute's value in 
uppercase, then the stylesheet is not applied to the document.

e.g., <link rel=STYLESHEET href=foo.css>

I assume this is from the recent changes dealing with link elements, etc.

This needs a fix (a) for beta, of course, but (b) it really needs a fix 
ASAP so that development and testing of hyatt's changes can continue (you
see I thought this was his bug originally, till I looked closer :-).


Simple test (sorry, I haven't checked how other attributes are affected, 
although HTML attributes should be treated as case-insensitive always). 

--- ucrel.css ---
p.uc {border:3px solid red;}
 
--- lcrel.css ---
p.lc {border:3px solid green;}
 
--- ucrel.html ---
<html>
<head>
<!-- if STYLESHEET is uppercase, this stylesheet is not processed -->
<link rel=STYLESHEET href="ucrel.css">
<link rel=stylesheet href="lcrel.css">
</head>
<body>
  <p class="uc">
    <code>&lt;link rel=STYLESHEET href="ucrel.css"&gt;</code> 
    Do I have a red border?
  </p>
  <p class="lc">
    <code>&lt;link rel=stylesheet href="lcrel.css"&gt;</code> 
    Do I have a green border?
  </p>
</body>
</html>
Blocks: 78695
Severity: normal → major
> although HTML attributes should be treated as case-insensitive always). 

Er, well, that's not actually a true statement, but at any rate ...
I believe any case other than all lowercase with cause this.  For instance, 
rel="styleSheet" will also cause the stylesheet not to load.

This started happening on the 5/18 builds later in the day.

Jake
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla0.9.1
Is this what's causing some pages to get no stylesheets at all, not even 
html.css? One example of this is
http://www.w3.org/TR/xslt
I've got a fix. I dropped a ToLowerCase where I shouldn't have. Sorry about
that. The page at www.w3.org/TR/xslt is a different bug. Sicking is going to
file one for that. Looking for r and sr.
Attached patch Proposed fixSplinter Review
sr=jst
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
VERIFIED per http://jrgm/bugs/ucrel.html
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.