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.

link_to :method may append FORM within FORM

#1973

At the moment link_to :method => ... creates JavaScript that appends a FORM to the document (and then submits it). Form is appended as a sibling of link element, so if you use link_to :method => ... within a form, you'll get nested FORM elements, which is explicitly prohibited by specification [1]. The solution is to append the form to BODY element, which should guarantee, that we don't nest forms.

[1] http://www.w3.org/TR/xhtml1/#pro...

Reported by Jan Dudek · February 14th, 2009 @ 07:29 PM

State: wontfix
Milestone: 2.x
Assigned to: josh josh
Importance: none

Activity

  1. Jan Dudek
    Jan Dudek

    (I'm sorry, I forgot to add the patch).

    February 14th, 2009 @ 07:31 PM

  2. Pratik
    Pratik
    • Assigned user set to josh
    • State changed from new to incomplete
    • Title changed from [patch] link_to :method may append FORM within FORM to link_to :method may append FORM within FORM

    Patch should have tests too.

    March 9th, 2009 @ 02:22 PM

  3. Jan Dudek
    Jan Dudek

    Here's modified patch that includes tests too.

    March 13th, 2009 @ 05:24 PM

  4. Pratik
    Pratik
    • State changed from incomplete to new

    March 13th, 2009 @ 05:26 PM

  5. josh
    josh
    • State changed from new to open

    March 14th, 2009 @ 04:27 PM

  6. josh
    josh
    • State changed from open to wontfix

    I don't think its worth it to apply this to the 3.0 branch since its going get wiped out by the "agnostic" stuff

    May 17th, 2009 @ 04:40 PM

  7. Jason Morrison
    Jason Morrison

    Can this be applied to the 2.x branch? I understand that it will be obviated eventually, but this would be fantastic to have in 2.x.

    June 9th, 2009 @ 03:41 PM