From mboxrd@z Thu Jan 1 00:00:00 1970 From: Edmund Christian Herenz Subject: Bug: HTTP links that contain %20 get malformed to %2520 - affects ODT export [9.2.1 (9.2.1-dist @ /home/ehere/emacs-scripts/org-9.2.1/lisp/)] Date: Fri, 22 Feb 2019 13:33:18 +0900 Message-ID: <20190222043318.47t3kkpsa5kva2rp@as-4028.astro.su.se> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:49533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gx2YB-00054e-GM for emacs-orgmode@gnu.org; Thu, 21 Feb 2019 23:35:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gx2YA-0007ZV-1q for emacs-orgmode@gnu.org; Thu, 21 Feb 2019 23:35:03 -0500 Received: from mail-prod-route03.it.su.se ([77.238.36.174]:47668) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gx2Y9-0006dH-HE for emacs-orgmode@gnu.org; Thu, 21 Feb 2019 23:35:01 -0500 Received: from e-mailfilter01.sunet.se (e-mailfilter01.sunet.se [IPv6:2001:6b0:8:2::201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail-prod-route03.it.su.se (Postfix) with ESMTPS id 445JPJ6td0zxhb for ; Fri, 22 Feb 2019 05:33:24 +0100 (CET) Received: from smtp.su.se (mail-prod-smtp03.it.su.se [IPv6:2001:6b0:5:131:250:56ff:fe94:f91]) by e-mailfilter01.sunet.se (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id x1M4XN4J088109 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 22 Feb 2019 05:33:24 +0100 Received: from as-4028.astro.su.se (fwl-natcos.icrr.u-tokyo.ac.jp [157.82.231.130]) (Authenticated sender: ehere) by smtp.su.se (Postfix) with ESMTPSA id 445JPH2wd0zyv4 for ; Fri, 22 Feb 2019 05:33:23 +0100 (CET) Content-Disposition: inline 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" To: emacs-orgmode@gnu.org Hello, Consider the following HTTP link: http://skyserver.sdss.org/dr14/en/tools/quicklook/summary.aspx?ra=3D11%20= 54%2048.85&dec=3D+24%2043%2033.0 I have this link in the kill-ring, mark 'some text' in an org-mode buffer and run org-insert-link (C-c C-l). Then I yank the link (C-y) in the minibuffer, and hit enter twice (since the marked text is what I want for the description). Now, this is what I get in the org-mode buffer: [[http://skyserver.sdss.org/dr14/en/tools/quicklook/summary.aspx?ra=3D11%= 252054%252048.85&dec=3D+24%252043%252033.0][some text]] As you can see the %20 gets encoded again to %2520. %25 is the % sign defined in RFC 3986. I think we run into the problem that is mentioned in this RFC in Sect 2.4 https://tools.ietf.org/html/rfc3986 - i.e. encoding an decoding the % sign in URIs when it is not required, as the URI is already formed. Th expected behavoiour would be that the link gets inserted as is. I never noticed this strange (and likely wrong) "under the hood" behaviour before, as the links work fine when I open them (C-c C-o or clicking on them in org-mode), since they get decoded again, and passed in the right way to the browser. Also when pressing C-c C-l on such a link it is displayed in its originally form in the minibuffer. Moreover, also HTML export decodes the link to its originally form. However, when exporting to ODT, no such decoding happens - and I got malformed URL (i.e. with %2520 instead of %20) in my ODT document. With best regards, Christian Herenz P.S. Please CC me in follow-up emails, as I am not subscribed to the mailinglist. --=20 ------------------------------------------------------------------------ Edmund Christian Herenz Office: C6:1001 Stockholms universitet E-Mail: christian.herenz@astro.su.se AlbaNova universitetscentrum Phone: +46 (0)85 537 8512 Institutionen f=F6r astronomi Mobile: +46 (0)73 670 5571 106 91 Stockholm =20 ------------------------------------------------------------------------