22 Mar
2005
22 Mar
'05
6:59 a.m.
Hi! The problem is that if you have for eg. a slash in the string it will cause problems, it needs to be urlencoded. But PHP urlencode does not escape the slash. So I propose that we change urlencode to drupal_urlencode, as follows: function _drupal_urlencode($matches) { return '%'. dechex(ord($matches[0])); } function drupal_urlencode($string) { return preg_replace_callback('/[^[:alpha:]]/', '_drupal_urlencode', $title); } Of course, I'd love to see a simpler approach to the problem, but that's what came to my regexp obsessed mind... Regards NK