Closed Bug 384682 Opened 19 years ago Closed 12 years ago

Escaped leading whitespace ignored in font names

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: sharparrow1, Assigned: jtd)

References

()

Details

Attachments

(1 file, 1 obsolete file)

<!DOCTYPE html> <style> .a {font-family: \a\9\20Arial} </style> <div class="a">b</div> The letter should be rendered in Arial, not the default font. See Bug 384679 comment 1.
The rules of escaped characters hold --> http://www.w3.org/TR/CSS21/syndata.html \20A is the escaped sequence, rather than \20 . so you have \a ==> line feed ==> chop that leading space character in the font identifier \9 ==> tab ==> chop it too \20A ==> hexadecimal digit 20A. We don't chop that. and I think you are left with a font family called "522rial", which you don't likely have.
Comment 1 is correct. ->invalid
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
Indeed, 'font-family: \20Arial' will parse as Ȋrial where Ȋ is U+020A. But 'font-family: \20 Arial' does produce an identifier whose parsed value starts with a space that should not be removed. See bug 384679
Flags: needinfo?(dbaron)
indeed
Status: RESOLVED → REOPENED
Depends on: 280443
Flags: needinfo?(dbaron)
Resolution: INVALID → ---
Summary: Escaped leading whitespace not ignored in font names → Escaped leading whitespace ignored in font names
This appears to be fixed by bug 280443.
Attachment #8447826 - Flags: review?(simon.sapin)
Adding reftest for the escaped trailing space case too.
Attachment #8447826 - Attachment is obsolete: true
Attachment #8447826 - Flags: review?(simon.sapin)
Attachment #8447869 - Flags: review?(simon.sapin)
Comment on attachment 8447869 [details] [diff] [review] patch, add reftest for escaped font family names Review of attachment 8447869 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me.
Attachment #8447869 - Flags: review?(simon.sapin) → review+
Can we please run this test through Try to make sure there aren't any surprises lurking? :)
Keywords: checkin-needed
Assignee: nobody → jdaggett
Status: REOPENED → RESOLVED
Closed: 19 years ago → 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
See Also: → 1309425
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: