aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-12-06 17:59:52 +0100
committerLars Magne Ingebrigtsen2010-12-06 17:59:52 +0100
commit3c2317e89100833812a7194c0d9d39ae0f52cb33 (patch)
treeedaeb216298a16f6c66631e0848d32f430787e63 /src
parentce327e48a158a1b59c6ccf54c26763c3460ca268 (diff)
downloademacs-3c2317e89100833812a7194c0d9d39ae0f52cb33.tar.gz
emacs-3c2317e89100833812a7194c0d9d39ae0f52cb33.zip
Return CDATA sections (like <style>foo</style>) as text nodes.
Also ignore blank HTML nodes.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xml.c5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e05855a4abf..47dd5c650c3 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12010-12-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * xml.c (parse_region): Ignore blank HTML nodes.
4 (make_dom): Return CDATA sections (like <style>foo</style>) as
5 text nodes.
6
12010-12-06 Stefan Monnier <monnier@iro.umontreal.ca> 72010-12-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * lread.c (read1): Allow newstyle unquote outside of backquote. 9 * lread.c (read1): Allow newstyle unquote outside of backquote.
diff --git a/src/xml.c b/src/xml.c
index a686e55f0b0..fde9d4d382a 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -62,7 +62,7 @@ Lisp_Object make_dom (xmlNode *node)
62 62
63 return Fnreverse (result); 63 return Fnreverse (result);
64 } 64 }
65 else if (node->type == XML_TEXT_NODE) 65 else if (node->type == XML_TEXT_NODE || node->type == XML_CDATA_SECTION_NODE)
66 { 66 {
67 if (node->content) 67 if (node->content)
68 return build_string (node->content); 68 return build_string (node->content);
@@ -105,7 +105,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, int html
105 doc = htmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), 105 doc = htmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)),
106 bytes, burl, "utf-8", 106 bytes, burl, "utf-8",
107 HTML_PARSE_RECOVER|HTML_PARSE_NONET| 107 HTML_PARSE_RECOVER|HTML_PARSE_NONET|
108 HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR); 108 HTML_PARSE_NOWARNING|HTML_PARSE_NOERROR|
109 HTML_PARSE_NOBLANKS);
109 else 110 else
110 doc = xmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)), 111 doc = xmlReadMemory (BYTE_POS_ADDR (CHAR_TO_BYTE (istart)),
111 bytes, burl, "utf-8", 112 bytes, burl, "utf-8",