From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: HAMANO Kiyoto Newsgroups: gmane.emacs.devel Subject: `html-parse-string' ignores script tag and comment. Date: Mon, 13 Sep 2010 01:13:39 +0900 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1284308030 20246 80.91.229.12 (12 Sep 2010 16:13:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Sep 2010 16:13:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 12 18:13:49 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OupBc-0007kc-Au for ged-emacs-devel@m.gmane.org; Sun, 12 Sep 2010 18:13:48 +0200 Original-Received: from localhost ([127.0.0.1]:54455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OupBb-0006kw-KK for ged-emacs-devel@m.gmane.org; Sun, 12 Sep 2010 12:13:47 -0400 Original-Received: from [140.186.70.92] (port=45953 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OupBW-0006km-5G for emacs-devel@gnu.org; Sun, 12 Sep 2010 12:13:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OupBV-0006gd-1N for emacs-devel@gnu.org; Sun, 12 Sep 2010 12:13:42 -0400 Original-Received: from mail-qw0-f41.google.com ([209.85.216.41]:33706) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OupBU-0006gT-UX for emacs-devel@gnu.org; Sun, 12 Sep 2010 12:13:41 -0400 Original-Received: by qwf7 with SMTP id 7so2965977qwf.0 for ; Sun, 12 Sep 2010 09:13:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=PPr8f/NnwQjUgodevEwy+pWiNMMpOiq/XXiMmoKF+KI=; b=ka95QFPLlI/ofUNLAb33w63FPrrS0oIBE/gDIRkhUD2Zws12tPBfsoABAi/qxEBY6H BQPe2nGJqZJDfkRpD12vRsFIduc4QGdGKRnoxFu/cj66+pwYc5bx6VjObpMZcDI2HRM0 xNV3Cn88g1SewzrvMImiivoZizVgdtWsMNvXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=olUnm5xjIy0KV//N3yeNJddlan09QDdVSMITDCmldh15UR8xmPPR1E5eAwJr9RcVrf 6AWEJMoufavFHsscEtwIBOJcBHtt7deZaSsdsvHfgQbn+yGaRZafScXBSbxtXLdXaC29 exqmYBVI/AHri/2/nLn+0CWPHFLRZk9I20phg= Original-Received: by 10.229.75.1 with SMTP id w1mr2472218qcj.100.1284308019989; Sun, 12 Sep 2010 09:13:39 -0700 (PDT) Original-Received: by 10.229.72.217 with HTTP; Sun, 12 Sep 2010 09:13:39 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130016 Archived-At: 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 "") ; => (html (head (script nil))) (html-parse-string "

foo

") ; => (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