emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* "%3f" shouldn't be unescaped in HTTP URLs
@ 2010-03-09 17:36 Sebastien Delafond
  2010-03-15 19:17 ` Ivan Vilata i Balaguer
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Delafond @ 2010-03-09 17:36 UTC (permalink / raw)
  To: emacs-orgmode

Quoting from Debian bug #573186[0]:

  Some HTTP URLs have literal '?' in them.  Since '?' also separates the
  path from query arguments, it needs to be escaped in the first case.
  These are examples of the two cases:

  - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf%3F
    (literal '?')
  - http://www.google.com/search?q=org+mode (query separator)

  These are the URLs generated by Org mode when exporting them to HTML:

  - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf?
  - http://www.google.com/search?q=org+mode

  I.e. '?' is left as is, but '%3f' is unescaped, producing the wrong
  URL (don't be fooled by the fact that Wikipedia actually accepts it ;)
  ).  This makes impossible to correctly export an HTTP URL with a
  literal question mark in it.

  The solution would be to leave '%3f' as is, too, in the same way as
  '%27' has been left as is in the previous example.

What do you guys think ?

Cheers,

--Seb

[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573186

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "%3f" shouldn't be unescaped in HTTP URLs
  2010-03-09 17:36 "%3f" shouldn't be unescaped in HTTP URLs Sebastien Delafond
@ 2010-03-15 19:17 ` Ivan Vilata i Balaguer
  2010-03-15 19:43   ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Ivan Vilata i Balaguer @ 2010-03-15 19:17 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1354 bytes --]

Sebastien Delafond (el 2010-03-09 a les 17:36:16 +0000) va dir::

> Quoting from Debian bug #573186[0]:
> 
>   Some HTTP URLs have literal '?' in them.  Since '?' also separates the
>   path from query arguments, it needs to be escaped in the first case.
>   These are examples of the two cases:
> 
>   - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf%3F
>     (literal '?')
>   - http://www.google.com/search?q=org+mode (query separator)
> 
>   These are the URLs generated by Org mode when exporting them to HTML:
> 
>   - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf?
>   - http://www.google.com/search?q=org+mode
> 
>   I.e. '?' is left as is, but '%3f' is unescaped, producing the wrong
>   URL (don't be fooled by the fact that Wikipedia actually accepts it ;)
>   ).  This makes impossible to correctly export an HTTP URL with a
>   literal question mark in it.
> 
>   The solution would be to leave '%3f' as is, too, in the same way as
>   '%27' has been left as is in the previous example.

Hasn't anyone come across this behaviour?  I think it's a bug which should be
fixed since it makes some URLs impossible to write.  And according to that last
sentence, the solution doesn't seem too hard.

Thanks and cheers,

::

  Ivan Vilata i Balaguer -- http://ivan.lovesgazpacho.net/

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "%3f" shouldn't be unescaped in HTTP URLs
  2010-03-15 19:17 ` Ivan Vilata i Balaguer
@ 2010-03-15 19:43   ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2010-03-15 19:43 UTC (permalink / raw)
  To: Ivan Vilata i Balaguer; +Cc: emacs-orgmode


On Mar 15, 2010, at 8:17 PM, Ivan Vilata i Balaguer wrote:

> Sebastien Delafond (el 2010-03-09 a les 17:36:16 +0000) va dir::
>
>> Quoting from Debian bug #573186[0]:
>>
>>  Some HTTP URLs have literal '?' in them.  Since '?' also separates  
>> the
>>  path from query arguments, it needs to be escaped in the first case.
>>  These are examples of the two cases:
>>
>>  - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf%3F
>>    (literal '?')
>>  - http://www.google.com/search?q=org+mode (query separator)
>>
>>  These are the URLs generated by Org mode when exporting them to  
>> HTML:
>>
>>  - http://en.wikipedia.org/wiki/Who%27s_Afraid_of_Virginia_Woolf?
>>  - http://www.google.com/search?q=org+mode
>>
>>  I.e. '?' is left as is, but '%3f' is unescaped, producing the wrong
>>  URL (don't be fooled by the fact that Wikipedia actually accepts  
>> it ;)
>>  ).  This makes impossible to correctly export an HTTP URL with a
>>  literal question mark in it.
>>
>>  The solution would be to leave '%3f' as is, too, in the same way as
>>  '%27' has been left as is in the previous example.
>
> Hasn't anyone come across this behaviour?  I think it's a bug which  
> should be
> fixed since it makes some URLs impossible to write.  And according  
> to that last
> sentence, the solution doesn't seem too hard.

Hi Ivan,

the bug has not yet been fixed because my time is limited.  Please  
consider submitting a patch.

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-15 19:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09 17:36 "%3f" shouldn't be unescaped in HTTP URLs Sebastien Delafond
2010-03-15 19:17 ` Ivan Vilata i Balaguer
2010-03-15 19:43   ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).