From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Fix of upstream parsing of CDATA Date: Thu, 12 Mar 2020 09:35:07 +0100 Message-ID: <8d8bc0a1-04b0-4aeb-8be6-16864bfa288d@www.fastmail.com> References: <5811db42-ecbe-4ad9-a44f-87481f1ac9a6@www.fastmail.com> Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="24244"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.1.7-991-g5a577d3-fmstable-20200305v3 To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Thu Mar 12 09:35:52 2020 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCJJm-0006B5-9J for guile-devel@m.gmane-mx.org; Thu, 12 Mar 2020 09:35:50 +0100 Original-Received: from localhost ([::1]:37628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCJJl-0000pe-6m for guile-devel@m.gmane-mx.org; Thu, 12 Mar 2020 04:35:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46985) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCJJV-0000m1-Ud for guile-devel@gnu.org; Thu, 12 Mar 2020 04:35:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCJJU-00009z-Pv for guile-devel@gnu.org; Thu, 12 Mar 2020 04:35:33 -0400 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:34161) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jCJJU-00008q-Be for guile-devel@gnu.org; Thu, 12 Mar 2020 04:35:32 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id B77F494E for ; Thu, 12 Mar 2020 04:35:29 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute7.internal (MEProxy); Thu, 12 Mar 2020 04:35:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=veryfast.biz; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm2; bh=Dn17+ 30kODE7MNs4HbEFDmD6l94doTsWPyhT0IKOVkc=; b=YC79eKFwAXrut9hZgll37 c2yVuKoqjEkAkhPklAkBcAnc/FcwVCbO19tV9L2UVc9ojOa79aYn/dgDY0VBoQIt YxCVL1eYIsSANlDwcj20q6WWMwxR3u2BpSSjHWToehPQPPQmB8QkUF3L0brntx7I GLvn3v4L/lDhGkcU7TAmQbKB7qbJl7I+nHtn/bMacCca5lioclNKGzDHun/pt7AN 75zb4tCatUjqEgpmjTPVlpugIv6zJgTy7POvWEtSoIjvN2COrpxT40bXCltvgiL3 4AcZRDZdb0mC8AM+s+2vNgr14xZe5xzpmR9oaM73WP+k1js1vLQ+d/DhnMHQ1W/A Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Dn17+30kODE7MNs4HbEFDmD6l94doTsWPyhT0IKOV kc=; b=HBuph8jcRs67K0qXsBdbUoAtJA1NB5kJIxrabRR+QN3sG4URUDU1kfxVd OQJvuRLbfjiHeAXuxxqrQ8899/+BtkKyVoCOMHPRp577MTWXEu6Sl18x+H4/kPbv +T1pFQwftxQ6tVK5ELY6S53yhxiF0ufN4TrLhl6/PXIIGRkSXpJFFZhqmMnmrgD2 CEqUEAQw6Hr5uEs8F914DKNZ3vXY7uapbim7ha6uHlbVnpKk47EiNW/q83cdm3cG j8n5bWMwvrtN5IUzh0HoxEOn9MbC7bn+lPLjAgG3lv3VyqfwT/0lI+w3YwqFvvdI wqOoZ8QIT+pQKJJsZWSCAq3Cn2BDQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddvgedgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgse htqhertderreejnecuhfhrohhmpefnihhnuhhspgeujhpnrhhnshhtrghmuceolhhinhhu shdrsghjohhrnhhsthgrmhesvhgvrhihfhgrshhtrdgsihiiqeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlihhnuhhsrdgsjhhorhhnshht rghmsehvvghrhihfrghsthdrsghiii X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 24112C200A4; Thu, 12 Mar 2020 04:35:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <5811db42-ecbe-4ad9-a44f-87481f1ac9a6@www.fastmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.123.19 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:20447 Archived-At: Oleg replied that he will look into this bug when he has time (and that = the patch looked reasonable), which sounded non-imminent :) Hopefully th= is means that there will be an upstream patch sometime in the future. --=20 Linus Bj=C3=B6rnstam On Thu, 16 Jan 2020, at 13:00, Linus Bj=C3=B6rnstam wrote: > Hello Guilers! >=20 > RhodiumToad found an error in sxml where it would not properly parse=20= > CDATA: > would be converted to > inside CDATA blocks. This is=20 > probably due to some wrong reading of the XML spec: >=20 > "Within a CDATA section, only the CDEnd string is recognized as=20= > markup, so that left angle brackets and ampersands may occur in their=20= > literal form; they need not (and cannot) be escaped using ' < ' and= =20 > ' & '.". >=20 > Notice that it mentions that only CDEnd is recognized, but omitts >= =20 > in the enumeration of things that need-not-and-cannot be escaped.=20 >=20 > No other XML libraries behave this way. Take for example python's Etre= e: >=20 > Python 2.7.17 (default, Dec 23 2019, 21:25:33) > >>> import xml.etree.ElementTree as ET > >>> root =3D ET.fromstring("") > >>> root.text > '>' >=20 > The same thing with the un-patched (sxml ssax) (or rather (sxml=20 > simple)): looks different: >=20 > (xml->sxml "") > ;; =3D> (*TOP* (e ">")) >=20 > The question is whether this patch should be sent upstream. Since ther= e=20 > has been very little activity there, I suspect it is a lost cause. >=20 > Failing tests have been looked through, verified and fixed. No=20 > unexpected errors were encountered. All SXML tests pass after this=20 > patch. >=20 > Best regards > Linus Bj=C3=B6rnstam > Attachments: > * 0001-module-sxml-upstream-SSAX.scm-Fix-improper-handling-.patch