-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Livevalidation seems to have broken with rails 2.3.8 - the javascript returned is now being passed thru the ERB::Util.h() function and the <script> tags turned into & lt;script& gt; tags.
This seems to be because the form helpers now return an ActiveSupport::SafeBuffer instead of a String, causing the concatenation of the generated javascript to passed thru h()
The fix is relatively simple - the javascript just needs to be marked as html_safe. In lib/form_helper.rb
def live_validations_for(object_name, method)
script_tags(live_validation(object_name, method))
end
should be:
def live_validations_for(object_name, method)
script_tags(live_validation(object_name, method)).html_safe
end
Metadata
Metadata
Assignees
Labels
No labels