mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibWeb: Advance position at attribute end quote in encoding detection
This did not cause any immediate issues except generating instances of `Attr` with useless values which caused some unnecessary work during encoding detection.
This commit is contained in:
parent
40d1f42418
commit
4ebbbdfef1
Notes:
github-actions[bot]
2025-11-21 16:44:27 +00:00
Author: https://github.com/gmta
Commit: 4ebbbdfef1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6893
1 changed files with 3 additions and 1 deletions
|
|
@ -180,8 +180,10 @@ value:
|
|||
// 3. If the value of the byte at position is the value of b, then advance position to the next byte
|
||||
// and abort the "get an attribute" algorithm.
|
||||
// The attribute's name is the value of attribute name, and its value is the value of attribute value.
|
||||
if (input[position] == quote_character)
|
||||
if (input[position] == quote_character) {
|
||||
++position;
|
||||
return DOM::Attr::create(document, MUST(attribute_name.to_string()), MUST(attribute_value.to_string()));
|
||||
}
|
||||
|
||||
// 4. Otherwise, if the value of the byte at position is in the range 0x41 (A) to 0x5A (Z),
|
||||
// then append a code point to attribute value whose value is 0x20 more than the value of the byte at position.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue