[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Org links, URLs and HTML export

From: Fabrice Popineau
Subject: Re: [O] Org links, URLs and HTML export
Date: Tue, 23 Aug 2016 18:57:03 +0200

2016-08-23 18:30 GMT+02:00 Achim Gratz <address@hidden>:
Fabrice Popineau writes:
> I can insert : [[http:bar.html]]
> However, I would like to be able to insert any kind of relative url.
> Specifically, there is no mean to insert something
> like : [[http:/bar.html]] which is exported to <a href=""> > The corresponding export should be <a href="">
But that's an absolute URL, provided a well-defined base URI exists (the
authority is implied and the path component starts with a slash, so it
would start in the root).

> Strangely, some browsers grok the former (Chrome), but not all of them
> (Safari).

Then Safari either has a bug or it determines the base URI differently
than Chrome.

> Anyway, only the later is correct.

I don't think so.  You might want to read


specifically the part about the translation of relative URI.

Thanks for the pointer. 
It helps because it states that:

"Some parsers allow the scheme name to be present in a relative
   reference if it is the same as the base URI scheme.  This is
   considered to be a loophole in prior specifications of partial URI
   [RFC1630].  Its use should be avoided but is allowed for backward

And on page 21:

"If the URI scheme defines a default for host, then that default
   applies when the host subcomponent is undefined or when the
   registered name is empty (zero length).  For example, the "file" URI
   scheme is defined so that no authority, an empty host, and
   "localhost" all mean the end-user's machine, whereas the "http"
   scheme considers a missing authority or empty host invalid."

So exporting to <a href="" is wrong.

I guess I can solve that with a filter.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]