Hi, how do I use a URL with special characters? If I use "&" or "?" in the URL, Drupal encodes it into plain text, and then the page I jump_quickly to has an incorrect URL. For example:
global $user;
$options = array(
'products/56?v1=AND&v2=6' => t('Link Title')
);
print jump_quickly($options);
sends the user to www.example.com/products/56%3Fv1%3DAND%2526v2%3D6 but I really want it to point to www.example.com/products/56?v1=AND&v2=6. Any help would be appreciated.
Comments
Comment #1
rj commentedAs a follow up, I ended up hard-coding the URL into the array and it works the way I want it to. I know hard-coding isn't best practices, but hey, it works. So to anyone facing the same problem, this is how your code should look if you want special characters in your path:
Comment #2
kmiles commentedThanks cultiv8, this info concerning the url encoding was quite helpful.
Comment #3
nicholas.alipaz commentedComment #4
dr3ads commentedHi,
I also have this situation. Here is how I dealt with the problem. I know the code is not yet good, but I will share the idea. I haven't got the time to furnish the code..
Comment #5
nicholas.alipaz commenteddr3ads, not only did you not use code tags to show your code, but I can't really work with a section of code taken from the module. Please try putting it together as a patch if you're serious about helping us fix this issue.
Comment #6
dr3ads commentednicholas, still working on the project. Will work on the patch after I am done with this project. Also, I am very new to contributing works on modules. I still have to read details about this..
Thanks!
-dr3ads