mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-26 00:09:41 +03:00
Fix to escape comments in save complete output.
This commit is contained in:
parent
af1572be92
commit
2385f8269a
@ -868,6 +868,9 @@ static bool save_complete_node_handler(dom_node *node,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type == DOM_COMMENT_NODE)
|
||||
fwrite("<!--", 1, sizeof("<!--") - 1, ctx->fp);
|
||||
|
||||
if (text != NULL) {
|
||||
text_data = dom_string_data(text);
|
||||
text_len = dom_string_byte_length(text);
|
||||
@ -877,7 +880,12 @@ static bool save_complete_node_handler(dom_node *node,
|
||||
|
||||
dom_string_unref(text);
|
||||
}
|
||||
|
||||
if (type == DOM_COMMENT_NODE) {
|
||||
fwrite("-->", 1, sizeof("-->") - 1, ctx->fp);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (type == DOM_DOCUMENT_TYPE_NODE) {
|
||||
dom_string *name;
|
||||
const char *name_data;
|
||||
|
Loading…
Reference in New Issue
Block a user