r13603 dsilvers - /trunk/libdom/src/core/node.c

netsurf at semichrome.net netsurf at semichrome.net
Sat Mar 24 16:59:35 GMT 2012


Author: dsilvers
Date: Sat Mar 24 11:59:35 2012
New Revision: 13603

URL: http://source.netsurf-browser.org?rev=13603&view=rev
Log:
And ensure we don't recurse comments and PIs during dom_node_get_text_content

Modified:
    trunk/libdom/src/core/node.c

Modified: trunk/libdom/src/core/node.c
URL: http://source.netsurf-browser.org/trunk/libdom/src/core/node.c?rev=13603&r1=13602&r2=13603&view=diff
==============================================================================
--- trunk/libdom/src/core/node.c (original)
+++ trunk/libdom/src/core/node.c Sat Mar 24 11:59:35 2012
@@ -1444,6 +1444,9 @@
 	assert(node->owner != NULL);
 	
 	for (n = node->first_child; n != NULL; n = n->next) {
+		if (n->type == DOM_COMMENT_NODE ||
+		    n->type == DOM_PROCESSING_INSTRUCTION_NODE)
+			continue;
 		dom_node_get_text_content(n, (str == NULL) ? &str : &ret);
 		if (ret != NULL) {
 			dom_string *new_str;




More information about the netsurf-commits mailing list