summaryrefslogtreecommitdiff
path: root/src/core/document.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2014-01-23 23:41:58 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2014-01-23 23:41:58 +0000
commit91bee91db8eb8d9a62afb31b3be5a834e8f2135d (patch)
treedec17afa252b302448e5e7c3d583c553967420d4 /src/core/document.c
parent7cf749f4a5d167e924d5ea2fc3d1772ff697d6e1 (diff)
downloadlibdom-91bee91db8eb8d9a62afb31b3be5a834e8f2135d.tar.gz
libdom-91bee91db8eb8d9a62afb31b3be5a834e8f2135d.tar.bz2
Strip and collapse whitespace when gathering html option values.
Diffstat (limited to 'src/core/document.c')
-rw-r--r--src/core/document.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/core/document.c b/src/core/document.c
index 22f08f1..a78cde9 100644
--- a/src/core/document.c
+++ b/src/core/document.c
@@ -147,6 +147,14 @@ dom_exception _dom_document_initialise(dom_document *doc,
return err;
}
+ err = dom_string_create_interned((const uint8_t *) "script",
+ SLEN("script"), &doc->script_string);
+ if (err != DOM_NO_ERR) {
+ dom_string_unref(doc->id_name);
+ dom_string_unref(doc->class_string);
+ return err;
+ }
+
/* Intern the empty string. The use of a space in the constant
* is to prevent the compiler warning about an empty string.
*/
@@ -155,6 +163,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
if (err != DOM_NO_ERR) {
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -165,6 +174,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -176,6 +186,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -188,6 +199,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -201,6 +213,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -215,6 +228,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -230,6 +244,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -246,6 +261,7 @@ dom_exception _dom_document_initialise(dom_document *doc,
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
return err;
}
@@ -283,6 +299,7 @@ bool _dom_document_finalise(dom_document *doc)
dom_string_unref(doc->id_name);
dom_string_unref(doc->class_string);
+ dom_string_unref(doc->script_string);
dom_string_unref(doc->_memo_empty);
dom_string_unref(doc->_memo_domnodeinserted);
dom_string_unref(doc->_memo_domnoderemoved);