mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Disallow empty font-language-override
string values
This commit is contained in:
parent
a4d931d14a
commit
c55f281475
Notes:
github-actions[bot]
2025-06-14 20:06:16 +00:00
Author: https://github.com/tcl3
Commit: c55f281475
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5091
Reviewed-by: https://github.com/shannonbooth
2 changed files with 7 additions and 3 deletions
|
@ -2623,6 +2623,10 @@ RefPtr<CSSStyleValue const> Parser::parse_font_language_override_value(TokenStre
|
|||
return nullptr;
|
||||
}
|
||||
auto length = string_value.code_points().length();
|
||||
if (length == 0) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Failed to parse font-language-override: <string> value is empty");
|
||||
return nullptr;
|
||||
}
|
||||
if (length > 4) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Failed to parse font-language-override: <string> value \"{}\" is too long", string_value);
|
||||
return nullptr;
|
||||
|
|
|
@ -2,11 +2,11 @@ Harness status: OK
|
|||
|
||||
Found 6 tests
|
||||
|
||||
4 Pass
|
||||
2 Fail
|
||||
5 Pass
|
||||
1 Fail
|
||||
Pass e.style['font-language-override'] = "auto" should not set the property value
|
||||
Pass e.style['font-language-override'] = "normal \"ksw\"" should not set the property value
|
||||
Pass e.style['font-language-override'] = "\"turkish\"" should not set the property value
|
||||
Fail e.style['font-language-override'] = "\"xøx\"" should not set the property value
|
||||
Fail e.style['font-language-override'] = "\"\"" should not set the property value
|
||||
Pass e.style['font-language-override'] = "\"\"" should not set the property value
|
||||
Pass e.style['font-language-override'] = "\"ENG \"" should not set the property value
|
Loading…
Add table
Add a link
Reference in a new issue