From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ekaitz Zarraga Newsgroups: gmane.lisp.guile.bugs Subject: bug#66366: [PATCH] doc: Add explanation on how to avoid escaping in SXML Date: Thu, 05 Oct 2023 20:48:34 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1796"; mail-complaints-to="usenet@ciao.gmane.io" To: 66366@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Thu Oct 05 22:50:04 2023 Return-path: Envelope-to: guile-bugs@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 1qoVIK-0000Jo-Bz for guile-bugs@m.gmane-mx.org; Thu, 05 Oct 2023 22:50:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoVI2-0001uQ-J9; Thu, 05 Oct 2023 16:49:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoVI0-0001tv-7a for bug-guile@gnu.org; Thu, 05 Oct 2023 16:49:44 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoVHz-0008CG-W8 for bug-guile@gnu.org; Thu, 05 Oct 2023 16:49:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qoVII-0006zM-CU for bug-guile@gnu.org; Thu, 05 Oct 2023 16:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 05 Oct 2023 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66366 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch X-Debbugs-Original-To: "bug-guile@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.169653896126799 (code B ref -1); Thu, 05 Oct 2023 20:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2023 20:49:21 +0000 Original-Received: from localhost ([127.0.0.1]:48633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVHc-0006yB-Nw for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:49:21 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:60482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoVHa-0006xt-R3 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:49:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoVHB-0001PU-Tl for bug-guile@gnu.org; Thu, 05 Oct 2023 16:48:54 -0400 Original-Received: from mail-4323.proton.ch ([185.70.43.23]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qoVHA-0007iD-73 for bug-guile@gnu.org; Thu, 05 Oct 2023 16:48:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1696538929; x=1696798129; bh=S7sDDSZfjFs0HHZ51CgVBiPuNo7SYC2bA09dnZTyxMo=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=pBxa5nhKQDeLcvZv4933QKoZWbxtB1gpS30JOrb/LeForDThEOSRyfGeN0cjmxHuE aCMigOsIIwcXj67kJGVmgEpJdG8NTvr+sDhntoUslsQbsI8r/EOuvluyioZZmafCoG W8OU1VoNFxrZhm9hrPpifm27nxaMk8vb3wpT2xPX0KXDgOfrpMxFjP0gTeWkYUgbQk PKhwkBsRGaNX0offK/l4JRLNAs+OtD0DAMHCXZge+BTC6k3Jw7PgMd3FrDQTU91LPP WXoydFiW7B6VGV0HIvnYo5xh7TUVbQSbT10+A3QT8FbQkFJZSv0Xeh7N/bsMdUtqwc KmlvmkuB0wWEA== Feedback-ID: 3263582:user:proton Received-SPF: pass client-ip=185.70.43.23; envelope-from=ekaitz@elenq.tech; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:10676 Archived-At: >From 7754fda28a6029116ee49172af28b5aa28bcda7e Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 5 Oct 2023 22:42:44 +0200 Subject: [PATCH] doc: Add explanation on how to avoid escaping in SXML * doc/ref/sxml.texi (Reading and Writing XML): Add explanation on using a procedure to avoid escaping. --- doc/ref/sxml.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/ref/sxml.texi b/doc/ref/sxml.texi index 835a39b36..b92f4c29e 100644 --- a/doc/ref/sxml.texi +++ b/doc/ref/sxml.texi @@ -203,6 +203,21 @@ the current output port, unless the optional argument = @var{port} is present. @end deffn =20 +Output is automatically escaped as expected for a serializer. + +@example +(sxml->xml `(code "Some example")) +@result{} <i>Some example</i> +@end example + +In order to avoid some string from being escaped, it must be wrapped in a +procedure that writes the string to the @code{(current-output-port)}. + +@example +(sxml->xml `(code ,(lambda () (display "Some example")))) +@result{} Some example +@end example + @deffn {Scheme Procedure} sxml->string sxml Detag an sxml tree @var{sxml} into a string. Does not perform any formatting. --=20 2.41.0