mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +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:
committed by
Andreas Kling
parent
683c08744a
commit
48fb343230
@@ -53,7 +53,7 @@ JS::NonnullGCPtr<DOM::Document> DOMParser::parse_from_string(StringView string,
|
||||
// 2. Create an HTML parser parser, associated with document.
|
||||
// 3. Place string into the input stream for parser. The encoding confidence is irrelevant.
|
||||
// FIXME: We don't have the concept of encoding confidence yet.
|
||||
auto parser = HTMLParser::create(*document, string, "UTF-8");
|
||||
auto parser = HTMLParser::create(*document, string, "UTF-8"sv);
|
||||
|
||||
// 4. Start parser and let it run until it has consumed all the characters just inserted into the input stream.
|
||||
// FIXME: This is to match the default URL. Instead, pass in this's relevant global object's associated Document's URL.
|
||||
|
||||
Reference in New Issue
Block a user