I want to pass a token into my custom module via the URL, like so:


Drupal has issues with passing tokens using clean URLs:


...and because my token has a '/' forward slash in it it breaks if I use arg(1) to get the token.

What to do?

1 Answer 1


For Drupal 7, use drupal_get_query_parameters().


  • Thanks, I've been trying that for hours & just after you posted your reply I figured out it wasn't even calling the function I'd put my code in ;) Commented Jul 9, 2016 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.