fix build_hidden_field_for_checkbox not returning html_safe string in some instances

This commit is contained in:
Tom McLoughlin 2020-05-30 20:20:46 +09:30
parent afda7b87b1
commit 75a2766632
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ module SimpleForm
# we need the hidden field to be *outside* the label (otherwise it
# generates invalid html - html5 only).
def build_hidden_field_for_checkbox
return "" if !include_hidden? || !unchecked_value
return "".html_safe if !include_hidden? || !unchecked_value
options = { value: unchecked_value, id: nil, disabled: input_html_options[:disabled] }
options[:name] = input_html_options[:name] if input_html_options.key?(:name)
options[:form] = input_html_options[:form] if input_html_options.key?(:form)