emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Edmund Christian Herenz <christian.herenz@astro.su.se>
Cc: emacs-orgmode@gnu.org
Subject: Re: 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, 01 Mar 2019 18:06:07 +0100	[thread overview]
Message-ID: <878sxyo77k.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <20190222043318.47t3kkpsa5kva2rp@as-4028.astro.su.se> (Edmund Christian Herenz's message of "Fri, 22 Feb 2019 13:33:18 +0900")

Hello,

Edmund Christian Herenz <christian.herenz@astro.su.se> writes:

> Consider the following HTTP link:
> http://skyserver.sdss.org/dr14/en/tools/quicklook/summary.aspx?ra=11%2054%2048.85&dec=+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=11%252054%252048.85&dec=+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.

It is not an issue per se. For historical reasons, Org needs to escape %
characters, and uses percent encoding to do so. So you have two layers
of percent encoding.
>
> Th expected behavoiour would be that the link gets inserted as is.

It does not work that way at the moment. However, that might change in
a next release. This is being discussed at the moment in this ML.

> 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.

This should now be fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2019-03-01 17:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  4:33 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/)] Edmund Christian Herenz
2019-03-01 17:06 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sxyo77k.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=christian.herenz@astro.su.se \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).