mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Fix field-value checking to not throw for lone spaces
This commit is contained in:
parent
afb6bf48e7
commit
7d029ae7b2
1 changed files with 15 additions and 1 deletions
|
@ -94,7 +94,21 @@ impl ByteString {
|
|||
false
|
||||
}
|
||||
},
|
||||
32 | 9 => { // SP | HT
|
||||
32 => { // SP
|
||||
if prev == LF || prev == SPHT {
|
||||
prev = SPHT;
|
||||
true
|
||||
} else if prev == Other {
|
||||
// Counts as an Other here, since it's not preceded by a CRLF
|
||||
// SP is not a CTL, so it can be used anywhere
|
||||
// though if used immediately after a CR the CR is invalid
|
||||
// We don't change prev since it's already Other
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
},
|
||||
9 => { // HT
|
||||
if prev == LF || prev == SPHT {
|
||||
prev = SPHT;
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue