Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[] should be escaped in urls

#5690

using rails3 and html5, user_path(:hash => {:a => 1}) outputs "/users?has[a]=1". this causes w3c validator errors, because [] (and possibly a few more special chars) have to be escaped in urls.

error message: Characters should be represented in NFC and spaces should be escaped as %20.

Reported by gucki · September 23rd, 2010 @ 04:19 PM

State: resolved
Milestone: 3.1
Assigned to: nobody
Importance: Low

Activity

  1. gucki
    gucki

    It seems the error is in the url_helpers. They are using html_escape even for the href argument. I suggest to use CGI.escape here instead, as html_escape is not the right thing. The error also occurs in other url helpers, ex #form_for etc.

    Ex: http://github.com/rails/rails/blob/master/actionpack/lib/action_vie...

    September 23rd, 2010 @ 04:35 PM

  2. gucki
    gucki
    • Tag changed from url helpers, rails3.0.0 to url helpers, patch, rails3.0.0

    September 23rd, 2010 @ 04:45 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open
    • Milestone cleared.
    • Importance changed from to Low

    October 11th, 2010 @ 12:02 AM

  4. Jeremy Kemper
  5. Ryan Bigg
    Ryan Bigg
    • Tag changed from sheepskin boots, url helpers, patch, rails3.0.0 to patch rails3.0.0 url helpers

    Automatic cleanup of spam.

    October 16th, 2010 @ 02:32 AM

  6. Ryan Bigg
    Ryan Bigg
    • Tag cleared.

    Automatic cleanup of spam.

    October 19th, 2010 @ 08:36 AM

  7. Santiago Pastorino
    Santiago Pastorino

    gucki can you please provide a patch again?, the one you sent is deleted.

    November 7th, 2010 @ 12:27 PM

  8. Santiago Pastorino
  9. Santiago Pastorino
  10. dsfsfsd3t