mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 17:48:12 +00:00
LibWeb: Consider content-type charset when determining XML encoding
This commit is contained in:
parent
07ea3ab306
commit
278e8afb42
3 changed files with 24 additions and 15 deletions
|
@ -319,7 +319,7 @@ void XMLHttpRequest::set_document_response()
|
|||
// 6. Otherwise, let document be a document that represents the result of running the XML parser with XML scripting support disabled on xhr’s received bytes. If that fails (unsupported character encoding, namespace well-formedness error, etc.), then return null.
|
||||
else {
|
||||
document = DOM::XMLDocument::create(realm(), m_response->url().value_or({}));
|
||||
if (!Web::build_xml_document(*document, m_received_bytes)) {
|
||||
if (!Web::build_xml_document(*document, m_received_bytes, {})) {
|
||||
m_response_object = Empty {};
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue