summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2012-07-05 09:52:43 +0100
committerDaniel Silverstone <dsilvers@netsurf-browser.org>2012-07-05 09:52:43 +0100
commit2b17955f784d216237f6f8fd7f89f20d3580576f (patch)
treeb46424188d18c36b2a1b7ae30e94cbf3b6b00d16 /src
parent399b0d94b0b3f8e87a1663d09b0321541801f79c (diff)
downloadlibdom-2b17955f784d216237f6f8fd7f89f20d3580576f.tar.gz
libdom-2b17955f784d216237f6f8fd7f89f20d3580576f.tar.bz2
CharacterData.delete: Fix this and enable 5 more tests
Diffstat (limited to 'src')
-rw-r--r--src/core/characterdata.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/characterdata.c b/src/core/characterdata.c
index 79b5fbe..0883444 100644
--- a/src/core/characterdata.c
+++ b/src/core/characterdata.c
@@ -343,6 +343,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
dom_exception err;
struct dom_document *doc;
bool success = true;
+ dom_string *empty;
if (_dom_node_readonly(c)) {
return DOM_NO_MODIFICATION_ALLOWED_ERR;
@@ -364,7 +365,10 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
end = (offset + count) >= len ? len : offset + count;
- err = dom_string_replace(c->value, NULL, offset, end, &temp);
+ empty = ((struct dom_document *)
+ ((struct dom_node_internal *)c)->owner)->_memo_empty;
+
+ err = dom_string_replace(c->value, empty, offset, end, &temp);
if (err != DOM_NO_ERR) {
return err;
}