1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibWeb: Check for valid names in Document.createElement() & friends

We now validate that the provided tag names are valid XML tag names,
and otherwise throw an "invalid character" DOM exception.

2% progression on ACID3. :^)
This commit is contained in:
Andreas Kling 2022-02-26 10:00:49 +01:00
parent 8daf603f46
commit fe67fe3791
7 changed files with 82 additions and 24 deletions

View file

@ -28,7 +28,7 @@ public:
}
// FIXME: Add optional DocumentType once supported by IDL
NonnullRefPtr<Document> create_document(const String&, const String&) const;
ExceptionOr<NonnullRefPtr<Document>> create_document(const String&, const String&) const;
NonnullRefPtr<Document> create_html_document(const String& title) const;
NonnullRefPtr<DocumentType> create_document_type(String const& qualified_name, String const& public_id, String const& system_id);