Follow us on Twitter
Welcome, Guest
Please Login or Register.    Lost Password?
JoomAce Support
AceSEF
Hacks, Tricks and Tips

FIXED: AceSEF breaks query strings with quote
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: FIXED: AceSEF breaks query strings with quote
#16581
FIXED: AceSEF breaks query strings with quote 1 Week, 1 Day ago  
Joomla has an unfortunate feature that it html escapes query strings. For vars that contain quotes, (eg. JX Finder: quotes searches), the extra ampersands which result will break up the query string value:

Code:

q=My+"Special Search"


becomes

Code:

q=My+"Special Search"


which results in variables
Code:


q = "My "
quot;Special%20Search = null
quot; = null



But because Joomla, in JApplication's route() method (line 296, "false" parameter -libraries/joomla/application.php), only updates $_GET vars that are NOT already set, it isn't an issue (q will still be "My \"Special Search\"")

But Ace's JRouterAcesef::setRequestVars() overwrites regardless, which breaks the functionality again.

SOLUTION:
Change the code in setRequestVars to simple be:
Code:


function setRequestVars(&$vars) {
  JRequest::set($vars, 'get', false );
}



I cant see a reason why this needs to be done manually as it is now. Using the native JRequest method fixes the issue on my sight...
Hari Karam Singh
PRO Customer
Posts: 8
graphgraph
Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
JoomAce Support
AceSEF
Hacks, Tricks and Tips
Powered by Kunenaget the latest posts directly to your desktop