mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-28 13:43:45 +03:00
LibWeb: Set correct document type when parsing XML with DOMParser
This commit is contained in:
parent
27e369cd19
commit
f18ea096e0
Notes:
sideshowbarker
2024-07-17 04:21:32 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/f18ea096e0 Pull-request: https://github.com/SerenityOS/serenity/pull/23243 Reviewed-by: https://github.com/gmta ✅
@ -62,6 +62,7 @@ JS::NonnullGCPtr<DOM::Document> DOMParser::parse_from_string(StringView string,
|
||||
// -> Otherwise
|
||||
document = DOM::XMLDocument::create(realm(), verify_cast<HTML::Window>(relevant_global_object(*this)).associated_document().url());
|
||||
document->set_content_type(Bindings::idl_enum_to_string(type));
|
||||
document->set_document_type(DOM::Document::Type::XML);
|
||||
|
||||
// 1. Create an XML parser parse, associated with document, and with XML scripting support disabled.
|
||||
XML::Parser parser(string, { .resolve_external_resource = resolve_xml_resource });
|
||||
|
Loading…
Reference in New Issue
Block a user