LibWeb: Skip UTF-8 validation in Node::descendant_text_content()

Since we're just concatenating a bunch of strings that are already
UTF-8, we don't need to check that the result is also UTF-8.
This commit is contained in:
Andreas Kling 2024-01-23 22:33:12 +01:00
parent 7fedf806c2
commit 413eb19579

View file

@ -151,7 +151,7 @@ String Node::descendant_text_content() const
builder.append(text_node.data());
return IterationDecision::Continue;
});
return MUST(builder.to_string());
return builder.to_string_without_validation();
}
// https://dom.spec.whatwg.org/#dom-node-textcontent