From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [bug] Org link dialog escapes URL spaces incorrectly Date: Fri, 04 Nov 2011 14:19:20 -0400 Message-ID: <26749.1320430760@alphaville.dokosmarshall.org> References: <23807.1320424380@alphaville.dokosmarshall.org> <24425.1320425559@alphaville.dokosmarshall.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOMP-0002dV-5f for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:19:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RMOMO-0001wN-21 for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:19:25 -0400 Received: from g5t0006.atlanta.hp.com ([15.192.0.43]:42569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RMOMN-0001wF-U4 for emacs-orgmode@gnu.org; Fri, 04 Nov 2011 14:19:24 -0400 In-Reply-To: Message from Brian Wightman of "Fri, 04 Nov 2011 12:56:29 CDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Brian Wightman Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Brian Wightman wrote: > On Fri, Nov 4, 2011 at 11:52 AM, Nick Dokos wrote: > > probably not a problem, since unescaping should be idempotent (in contrast to > > escaping ;-) ) but why do it twice? > > I am not sure I am reading this correctly - I am reading this as > unescaping a url-encoded twice should give the same results as > unescaping the same url-encoded string once. If that is what you are > saying, I would disagree. Taking a string similar to the one provided > originally: > > Did%2520France%2520Cause%2520the%2520Great%2520Depression.pdf > > would be unescaped as > > Did%20France%20Cause%20the%20Great%20Depression.pdf > > and a second unescape would generate > > Did France Cause the Great Depression.pdf > > Hopefully, I am just reading your statement wrong :-) > Nope - you read it right and it (the statement, not the reading) is wrong. But I'm not sure what the implications to the code are: do we have to unescape repeatedly until there are no more % signs in there? Then the final call to org-make-link-string would do one escaping pass and that would be that? My URL fu is weak. Any help would be appreciated. Thanks, Nick