Hobo 1.3: page path needs escaping
Reported by Bryan Larsen | February 22nd, 2011 @ 06:45 AM | in Hobo 1.3 (Rails 3)
When page_path contains parameters (like /charges?page=2) it confuses the heck out of prototype, and it ends up not sending a bunch of fields. When it doesn't send the render[] fields this causes Hobo to not do Ajax, causing massive chaos.
I haven't checked, but I think the page_path in Hobo 1.0 didn't include the params. I'd be very surprised if this bug exists in Hobo 1.0 because it doesn't seem too hard to trigger.
Comments and changes to this ticket
-
Domizio Demichelis February 22nd, 2011 @ 11:39 AM
Nice catch Bryan!
The old page_path way (that also was named differently) had some problem that I cannot remember with the new Rails, so I simplified the way page_path is passed around and translated back to controller and action, making hobo use the internal Rails method, instead of reinventing the wheel... but I missed that "collateral damage".
Your patch seems perfect, and it probably fixes a few other AJAX related bugs. Another possible way to fix it could be stripping the parameters before setting page_path. I don't remember whether they are used somehow or just ignored.
What is the simplest way?
-
Bryan Larsen February 25th, 2011 @ 04:56 PM
- Title changed from prototype is a buggy piece of @#% to Hobo 1.3: page path needs escaping
Yes, I seem to remember having problems with page_path in the past. It wasn't really page_path, it was controller/action. I'm fairly sure I have at least one app that stores the real page path because page_path couldn't be relied on. Good riddance.
We need to do the escaping regardless, so stripping the parameters is optional. I'd leave them in there.
-
Bryan Larsen February 25th, 2011 @ 06:13 PM
- State changed from new to resolved
(from [1ee8c600eb813bcba73d3781f7443f7c367def8b]) escaped page_path [#923 state:resolved] https://github.com/tablatom/hobo/commit/1ee8c600eb813bcba73d3781f74...
-
Bryan Larsen March 11th, 2011 @ 01:55 PM
(from [81edb5a2408ea248476f73e8f33f9b1c17e9da56]) escaped page_path [#923 state:resolved] https://github.com/tablatom/hobo/commit/81edb5a2408ea248476f73e8f33...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Attachments
Tags
Referenced by
- 923 Hobo 1.3: page path needs escaping (from [1ee8c600eb813bcba73d3781f7443f7c367def8b]) escaped...
- 923 Hobo 1.3: page path needs escaping (from [81edb5a2408ea248476f73e8f33f9b1c17e9da56]) escaped...