all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `html-parse-string' ignores script tag and comment.
@ 2010-09-12 16:13 HAMANO Kiyoto
  0 siblings, 0 replies; only message in thread
From: HAMANO Kiyoto @ 2010-09-12 16:13 UTC (permalink / raw)
  To: emacs-devel

I tried `html-parse-string' function.
Its feature is very interesting and very nice.
Thanks for implementing!

But, `html-parse-string' ignores script tags and comments.

(html-parse-string "<script>foo</script>")   ; => (html (head (script nil)))
(html-parse-string "<p>foo</p><!-- bar -->") ; => (html (body (p (text
. "foo")) nil))

The cause is like the make_dom function (src/xml.c).
The `make_dom' function see a XML_TEXT_NODE and XML_ELEMENT_NODE.
But, The function don't see a XML_CDATA_SECTION_NODE and XML_COMMENT_NODE.
Therefor, It seems that the script tag and comments are not displayed.

;; My environment: Emacs 24 (9/11 build), Debian GNU/Linux sid (i386)

-- 
HAMANO Kiyoto
khiker.mail@gmail.com



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-09-12 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-12 16:13 `html-parse-string' ignores script tag and comment HAMANO Kiyoto

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.