[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Org-protocol / Chrome on Linux
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] Org-protocol / Chrome on Linux |
Date: |
Thu, 30 Sep 2010 17:43:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Mattias Jämting <address@hidden> writes:
> Yes i'm running a pretty standard Ubuntu 10.04 setup.
>
> I managed to get it working on chrome by removing the
> encodeURIComponent command on location.href.
>
> I could simulate it in the terminal like this.
>
> address@hidden:~$ xdg-open org-protocol://capture://http%3A%2F%2Forgmode.org
> Error showing URL: Operation not supported
> address@hidden:~$ xdg-open org-protocol://capture://http://orgmode.org
> address@hidden:~$ (worked)
>
> Strange that it worked in FF. Maybe Chrome and FF encodes URIs differently?
Ooops!
I just was going to blame Google.
Looking into the ECMA standard, I found this:
15.1.3 URI Handling Function Properties
... ...
A URI is composed of a sequence of components separated by
component separators. The general form
is:
Scheme : First / Second ; Third ? Fourth
where the italicised names represent components and the “:”, “/”,
“;” and “?” are reserved characters used as separators. The
encodeURI and decodeURI functions are intended to work with
complete URIs; they assume that any reserved characters in the
URI are intended to have special meaning and so are not
encoded. The encodeURIComponent and decodeURIComponent functions
are intended to work with the individual component parts of a
URI; they assume that any reserved characters represent text and
so must be encoded so that they are not interpreted as reserved
characters when the component is part of a complete URI.
That document states "encodeURI" is to be used with complete URIs (as
the name says...). Funny. Chrome is the only browser that works like
that :)
I'll go and adjust the docs.
Thanks for your Report!!
Sebastian