>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. > > What exactly is the problem with this? If you escape a slash in an URL as %XX, then it will still arrive in Drupal as a slash, so you cannot use it to escape slashes in menu paths. Steven