emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Spaces in HTML export
Date: Tue, 17 Sep 2013 23:01:39 -0400	[thread overview]
Message-ID: <87mwnaj0j0.fsf@gmail.com> (raw)
In-Reply-To: F1BBEA22-525D-4252-BF18-758AF84D2691@gmail.com

"Simon W. Jones" <psilascom@gmail.com> writes:

> Hello,
>
> A few days ago I raised a problem with HTML export I was having and
> was advised to upgrade to Orgmode 8.1. I have now done so but the
> problem persists. The problem significantly effects my workflow and I
> would be very grateful for a solution.
>
> If I add a link in my document to an external website that has spaces
> in the URL, for example www.example.com/useful%20document.pdf, then
> export as HTML, the URL appears in the HTML output as
> www.example.com/useful%2520document.pdf. The link obviously then
> returns an error when one clicks on it.
>
> Is there any way round this issue, can anyone else replicate the problem?
>

How do you add the link to your org document? If you cut-and-paste into
the document, there should be no double encoding. If OTOH you use C-C
C-l, that *always* url-encodes, so you end up encoding the % sign and
%20 becomes %2520 since there is no way for org to know whether
something is urlencoded already. There was a discussion about this not
too long ago that came to this conclusion IIRC[fn:1].

You can get around the problem by constructing such links manually -
paste the url-encoded URL as it comes from your browser directly into
your org file buffer:

http://hl.udogs.net/files/Gaming/%20Myth%20Series/Myth%20II%20-%20Soulblighter/

and then put the link decorations around it by hand - after all, org is
just plain text:

[[http://hl.udogs.net/files/Gaming/%20Myth%20Series/Myth%20II%20-%20Soulblighter/][my link]]

Exporting that to HTML works fine I believe.

Footnotes:

[fn:1] http://thread.gmane.org/gmane.emacs.orgmode/74983
       but I haven't gone back to reread it all.

-- 
Nick

      reply	other threads:[~2013-09-18  3:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-17 17:37 Spaces in HTML export Simon W. Jones
2013-09-18  3:01 ` Nick Dokos [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=87mwnaj0j0.fsf@gmail.com \
    --to=ndokos@gmail.com \
    --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).