diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-10-02 12:39:08 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-10-02 12:39:08 +0100 |
commit | f1ac9a4e59ba0e4c208d90ec7df07ad252829b5b (patch) | |
tree | d58309472e575aa551ec24b71416820a6d9d8b83 | |
parent | af49ffb2b148e146feada9dea59342508414f122 (diff) | |
download | libdom-f1ac9a4e59ba0e4c208d90ec7df07ad252829b5b.tar.gz libdom-f1ac9a4e59ba0e4c208d90ec7df07ad252829b5b.tar.bz2 |
html_document: Tag names of '' are invalid
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r-- | src/html/html_document.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/html/html_document.c b/src/html/html_document.c index d978327..5d06e80 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -536,6 +536,10 @@ _dom_html_document_create_element_internal( dom_exception exc; struct dom_html_element_create_params params; + /* If the input tag name is empty, this is an 'invalid character' error */ + if (dom_string_length(in_tag_name) == 0) + return DOM_INVALID_CHARACTER_ERR; + exc = dom_string_toupper(in_tag_name, true, ¶ms.name); if (exc != DOM_NO_ERR) return exc; |