From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Org-protocol / Chrome on Linux Date: Thu, 30 Sep 2010 17:43:29 +0200 Message-ID: <87hbh7s0da.fsf@gmx.de> References: <87aao21i92.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=40869 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1LII-00077p-Nl for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1LIF-0000AQ-T4 for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:38 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:48033 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P1LIF-0000A3-Ig for emacs-orgmode@gnu.org; Thu, 30 Sep 2010 11:43:35 -0400 In-Reply-To: ("Mattias =?utf-8?Q?J=C3=A4mting=22's?= message of "Thu, 30 Sep 2010 15:11:50 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mattias =?utf-8?Q?J=C3=A4mting?= Cc: emacs-orgmode Mattias J=C3=A4mting 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. > > mattias@helium:~$ xdg-open org-protocol://capture://http%3A%2F%2Forgmode.= org > Error showing URL: Operation not supported > mattias@helium:~$ xdg-open org-protocol://capture://http://orgmode.org > mattias@helium:~$ (worked) > > Strange that it worked in FF. Maybe Chrome and FF encodes URIs differentl= y? 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=20 is: Scheme : First / Second ; Third ? Fourth where the italicised names represent components and the =E2=80=9C:= =E2=80=9D, =E2=80=9C/=E2=80=9D, =E2=80=9C;=E2=80=9D and =E2=80=9C?=E2=80=9D 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