[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Spaces in HTML export
From: |
Nick Dokos |
Subject: |
Re: [O] Spaces in HTML export |
Date: |
Tue, 17 Sep 2013 23:01:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
"Simon W. Jones" <address@hidden> 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