Closed (duplicate)
Project:
Drupal core
Version:
5.1
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2007 at 22:00 UTC
Updated:
7 Oct 2007 at 18:05 UTC
When calling url() with a path such as
"path/to/file & name.jpg"
it will incorrectly encode it as:
"http://servername.com/path/to/file+%2526+name.jpg"
This is due to the use of urlencode inside of rawurlencode() in drupal_urlencode() function.
Expected Output: Filename encoding follows RFC1738
Actual Output: Filename encoded by urlencode()
| Comment | File | Size | Author |
|---|---|---|---|
| drupal_urlencode.patch | 850 bytes | harking |
Comments
Comment #1
harking commentedJust read: http://drupal.org/node/139758
I disagree with Steven in his argument that urlencode should be used as it outputs "+" for space.
The urlencode function does not conform the the url spec., and thus should not be used in a project that strives for standards compliance.
Comment #2
ms2011 commentedFiles/URLs are not accessible if they contain reserved or non-ascii characters.
See url_generation.patch here http://drupal.org/node/43505#comment-316523
Comment #3
sun