forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibWeb: Decode linked style sheets before parsing them
This fixes an issue where a BOM at the head of a style sheet would be passed verbatim to the parser, who would then interpret it as an ident token and (after some confusion) fail to parse the first rule, but then carry on with the rest of the sheet.
- Loading branch information
1 parent
efad31d
commit 5767dd1
Showing
4 changed files
with
42 additions
and
9 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Tests/LibWeb/Text/expected/css/style-sheet-with-byte-order-mark.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PASS |
7 changes: 7 additions & 0 deletions
7
Tests/LibWeb/Text/input/css/style-sheet-with-byte-order-mark.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.pass { | ||
display: block; | ||
} | ||
|
||
div { | ||
display: none; | ||
} |
1 change: 1 addition & 0 deletions
1
Tests/LibWeb/Text/input/css/style-sheet-with-byte-order-mark.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<head><link rel="stylesheet" href="style-sheet-with-byte-order-mark.css"></head><div class="pass">PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters