From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Mismatch in url escaping between org and exported html Date: Tue, 11 Feb 2014 20:02:54 +0100 Message-ID: References: <87a9dz8bwg.fsf@bzg.ath.cx> <87iosmufi7.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113522968ca17304f2261ad3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDIbh-00078g-9n for emacs-orgmode@gnu.org; Tue, 11 Feb 2014 14:03:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDIbf-0003C1-Uc for emacs-orgmode@gnu.org; Tue, 11 Feb 2014 14:02:57 -0500 In-Reply-To: <87iosmufi7.fsf@bzg.ath.cx> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Rick Frankel , Org Mode --001a113522968ca17304f2261ad3 Content-Type: text/plain; charset=ISO-8859-1 Hi Bastien >From the commit of Rick Frankel for org-html-link (reformatted): #+BEGIN_SRC emacs-lisp (org-link-escape (org-link-unescape (concat type ":" raw-path)) org-link-escape-chars-browser) #+END_SRC I would like to discourage the use of the constant org-link-escape-chars-browser in favor of the function org-link-escape-browser that should use, and finally can be replaced with, the function url-encode-url available since Emacs 24.3.1. The patch attached for review will fix an Org link like e. g. [[http://lists.gnu.org/archive/cgi-bin/namazu.cgi?idxname=emacs-orgmode&query=%252Bsubject:"Release+8.2"]] with Emacs 24.3.1 now also for the Org export to HTML. Some time ago I added url-encode-url already to the function org-open-at-point. As this is not in maint and the attached patch depends on it I intend to apply the latter only on master. Michael --001a113522968ca17304f2261ad3 Content-Type: text/plain; charset=US-ASCII; name="0001-Fix-escaping-of-more-links-in-html-export.patch.txt" Content-Disposition: attachment; filename="0001-Fix-escaping-of-more-links-in-html-export.patch.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hrjjdk0v0 RnJvbSA2NGIyMDJmNGEwN2RkN2ExZDkyNzU2M2RmM2MyZGYwODljNzI3YWZmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNaWNoYWVsIEJyYW5kIDxtaWNoYWVsLmNoLmJyYW5kQGdtYWls LmNvbT4KRGF0ZTogVHVlLCAxMSBGZWIgMjAxNCAyMDowMDoyNiArMDEwMApTdWJqZWN0OiBbUEFU Q0hdIEZpeCBlc2NhcGluZyBvZiBtb3JlIGxpbmtzIGluIEhUTUwgZXhwb3J0CgoqIGxpc3Avb3Jn LmVsIChvcmctbGluay1lc2NhcGUtY2hhcnMpOiBFeHRlbmQgZG9jc3RyaW5nLgoob3JnLWxpbmst ZXNjYXBlLWNoYXJzLWJyb3dzZXIpOiBNZW50aW9uIGluIGRvY3N0cmluZyB0aGF0IGl0IHdpbGwK YmVjb21lIGEgY2FuZGlkYXRlIGZvciByZW1vdmFsLgoob3JnLWxpbmstZXNjYXBlLWJyb3dzZXIp OiBNZW50aW9uIGluIGRvY3N0cmluZyB0aGF0IGl0IHdpbGwgYmVjb21lIGEKY2FuZGlkYXRlIGZv ciByZW1vdmFsLgoob3JnLW9wZW4tYXQtcG9pbnQpOiBNb3ZlIGB1cmwtZW5jb2RlLXVybCcgYW5k IGNvbW1lbnRzIGludG8KYG9yZy1saW5rLWVzY2FwZS1icm93c2VyJy4KCiogbGlzcC9veC1odG1s LmVsIChvcmctaHRtbC1saW5rKTogTWFrZSB1c2Ugb2YKYG9yZy1saW5rLWVzY2FwZS1icm93c2Vy JyBsaWtlIGBvcmctb3Blbi1hdC1wb2ludCcuCi0tLQogbGlzcC9vcmcuZWwgICAgIHwgNjAgKysr KysrKysrKysrKysrKysrKysrKysrKysrKystLS0tLS0tLS0tLS0tLS0tLS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