mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb: Change HTMLParser's factory to accept the encoding as StringView
No need to force an allocation. This makes a future patch a bit simpler, where we will have the encoding as a String. With this patch, we won't have to convert it to a ByteString.
This commit is contained in:
parent
683c08744a
commit
48fb343230
Notes:
sideshowbarker
2024-07-17 05:18:58 +09:00
Author: https://github.com/trflynn89
Commit: 48fb343230
Pull-request: https://github.com/SerenityOS/serenity/pull/23830
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 8 additions and 8 deletions
|
@ -1127,7 +1127,7 @@ WebIDL::ExceptionOr<void> Navigable::populate_session_history_entry_document(
|
|||
// FIXME: Add error message to generated error page
|
||||
auto error_html = load_error_page(entry->url()).release_value_but_fixme_should_propagate_errors();
|
||||
entry->document_state()->set_document(create_document_for_inline_content(this, navigation_id, [error_html](auto& document) {
|
||||
auto parser = HTML::HTMLParser::create(document, error_html, "utf-8");
|
||||
auto parser = HTML::HTMLParser::create(document, error_html, "utf-8"sv);
|
||||
document.set_url(URL::URL("about:error"));
|
||||
parser->run();
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue