Welcome Guest, Not a member yet? Register   Sign In
CI BUG? URL ENCODE /URL DECODE problem in URL QUERY STRINGS
#1

[eluser]mindprojects[/eluser]
Hy guys i have this problem and i don't know if it's a CI Bug.
For SEO purposes and pagination, when i'm searching something in my app,my url will appear something like:
CONTROLLER/METHOD/CLEAR_PARAMS

1) If you are searching "test app" ,i send this post string to the same controller and the i redirect to the same page for pagination purposes doing an URLENCODE so that i see something like:

CONTROLLER/METHOD/q/test+app


Then in my controller if i want to get the search string i'm doing:
URLDECODE($this->uri->segment(4); and i get "test app".

The problem happens in this case:
I'm searching for "test + app" (plus is into the string for fulltext purposes).
Then in my controller i URLENCODE this post string and i redirect to the same page
for pagination purposes and i see something like:

CONTROLLER/METHOD/q/test+%2_B+app

Now if i want to get the search string i'm doing:
URLDECODE($this->uri->segment(4); and i get "test app" again.NO PLUS SIGN AT ALL!!!!

Is it a router.php problem ,in which i've seen the $_SERVER['PATH_INFO'] is used to retrieve the query string?
How can i solve this problem?

Thanks in advance
#2

[eluser]mindprojects[/eluser]
POST MOVED TO:
http://ellislab.com/forums/viewthread/134182/




Theme © iAndrew 2016 - Forum software by © MyBB