diff --git a/lib/consul_form_builder.rb b/lib/consul_form_builder.rb index 2433e867d..e5b77f69d 100644 --- a/lib/consul_form_builder.rb +++ b/lib/consul_form_builder.rb @@ -21,7 +21,7 @@ class ConsulFormBuilder < FoundationRailsHelper::FormBuilder def check_box(attribute, options = {}) if options[:label] != false - label = content_tag(:span, label_text(object, attribute, options[:label]), class: "checkbox") + label = content_tag(:span, sanitize(label_text(object, attribute, options[:label]), class: "checkbox")) super(attribute, options.merge(label: label, label_options: label_options_for(options))) else diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 034691e50..40b03d8dd 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -874,7 +874,7 @@ describe "Budget Investments" do fill_in "Title", with: "I am a bot" fill_in "budget_investment_subtitle", with: "This is the honeypot" fill_in "Description", with: "This is the description" - check "budget_investment_terms_of_service" + check "I agree to the Privacy Policy and the Terms and conditions of use" click_button "Create Investment"