ryanb/nested_form — pull request #155 by innovationfactory (2012-03-29 11:35:07+00:00)
Title: HTML-escape the blueprint

Javascript inside the blueprint should not be evaluated until it is inserted into the form. Although inline Javascript is not ideal and we're working hard to 'unobtrusify' everything, it's currently still a reality in our codebase, e.g. for initializing CKeditor instances.

This also fixed the problem of having an invalid HTML structure inside the invisible blueprint div. E.g. when it contains a table row or a list item, without respectively a table or list element. Also see elmatou's problem: issue #3 / https://github.com/ryanb/nested_form/pull/73.

I think in general it's a good idea to only evaluate a template's contents once it is used (i.e. in the right context).

Specs have been updated. Also fixed a pending spec.