CodeIgniter Forums
javascript escape(); and CI url's - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: javascript escape(); and CI url's (/showthread.php?tid=23476)



javascript escape(); and CI url's - El Forum - 10-12-2009

[eluser]Fabdrol[/eluser]
Hi guys,

I'm busy with a search engine, based on Yahoo!BOSS, but I've got a little trouble submitting javascript-escaped strings to my CI controller.

The escape code:
Code:
var query_str = escape(query);
    // example output: i % 27 m % 20 here (un-escaped: i'm alive)
    // without the spaces of-course, thats for displaying purposes

The error msg:
Code:
An Error Was Encountered
    The URI you submitted has disallowed characters.

What can I do to allow these characters? I suppose the url is valid, since that's where the escape function is for! (isn't it?)

thanks,
Fabian


javascript escape(); and CI url's - El Forum - 10-12-2009

[eluser]BrianDHall[/eluser]
You might want to see just what URI is being called. Personally I'd use the LiveHTTP Headers plugin for firefox, just cause its the easy way out Smile


javascript escape(); and CI url's - El Forum - 10-12-2009

[eluser]Fabdrol[/eluser]
I did, and the url is as follows: http://localhost/Klanten/Halal/public_html/index.php/search/web/i % 27 m % 20 fabdrol
(I added some spaces to make it possible to display here, imagine them gone!)

I think CI doesn't accept the % sign, what to do?

Thanks