Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #11539 (new defect)

Opened 1 month ago

Rails not handling links with & correctly

Reported by: anildigital Assigned to: core
Priority: normal Milestone: 2.x
Component: ActionPack Version: edge
Severity: normal Keywords: &query_string
Cc:

Description

Certain browsers including Firefox does not convert links & in it to &. That causes problems further in rails applications, where params gets created using parse_query_parameters method.

The query strings with & get parsed as key part e.g. query sting with &name=david would get converted to params as params[amp;name] instead of params[:name]. Ideally browser should convert & to & whenever it parses query strings. But that is not the case for current browsers.

This could be serious issue. The rails helper page.redirect_to outputs window.location links to have & in it. So page.redirect_to having additional params(other than controller, action, id) simply doesn't work.

here is the url to my commit to koz-rails fork for the fix.

http://github.com/anildigital/koz-rails/commit/077e8de4214d7958600b328c4fbd63215ecec7dd

Attachments

patch.diff (1.7 kB) - added by anildigital on 04/06/08 20:21:21.

Change History

04/06/08 20:21:21 changed by anildigital

  • attachment patch.diff added.