LibWeb: Fix missing 'get an output encoding' step in HTMLFormElement
This could mean that the picked encoding was not being set to UTF-8 if the documents encoding was 'replacement', 'utf-16le' or 'utf-16be'.
This commit is contained in:
parent
b0c1dc14f3
commit
d7c1cc0276
Notes:
sideshowbarker
2024-07-17 05:19:06 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/d7c1cc0276 Pull-request: https://github.com/SerenityOS/serenity/pull/21068
1 changed files with 1 additions and 1 deletions
|
@ -545,7 +545,7 @@ ErrorOr<String> HTMLFormElement::pick_an_encoding() const
|
|||
}
|
||||
|
||||
// 3. Return the result of getting an output encoding from encoding.
|
||||
return String::from_utf8(encoding.view());
|
||||
return MUST(String::from_utf8(TextCodec::get_output_encoding(encoding)));
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#convert-to-a-list-of-name-value-pairs
|
||||
|
|
Loading…
Add table
Reference in a new issue