drupal_urlencode and commas

moonray - January 26, 2007 - 16:25
Project:Drupal
Version:6.x-dev
Component:base system
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs work
Description

This is just a pretty-it-up patch for drupal_urlencode (which I'm hoping shouldn't change functionality).
Currently commas in urls get escaped, which makes multiple taxonomy selection urls look ugly. This patch makes sure the comma doesn't get escaped. (example: taxonomy/term/5,16,37)

It should be valid against both 5.x-dev and head.

AttachmentSize
drupal_urlencode_comma.patch697 bytes

#1

moonray - January 26, 2007 - 16:26
Status:active» needs review

#2

Steven - March 12, 2007 - 03:47

Which characters are allowed to be unescaped in a URL depends on the location in the URL. If we add such pretty printing, it needs to default to off, or otherwise drupal_urlencode() becomes useless in some situations. I think the best solution is a list of characters not to encode, passed as an array.

http://gbiv.com/protocols/uri/rfc/rfc3986.html#reserved

#3

drumm - September 18, 2007 - 06:54
Version:5.x-dev» 6.x-dev
Status:needs review» needs work

No longer applies.

Needs to be patched in 6.x first.

 
 

Drupal is a registered trademark of Dries Buytaert.