diff --git a/app/models/custom_tab.rb b/app/models/custom_tab.rb index d679f254d7..e8934afd36 100644 --- a/app/models/custom_tab.rb +++ b/app/models/custom_tab.rb @@ -5,11 +5,6 @@ class CustomTab < ApplicationRecord validates :title, presence: true, length: { maximum: 20 } - # Remove any unsupported HTML. - def content - HtmlSanitizer.sanitize(super) - end - # Remove any unsupported HTML. def content=(html) super(HtmlSanitizer.sanitize(html)) diff --git a/app/models/enterprise_group.rb b/app/models/enterprise_group.rb index 608cf8c879..5e59488f55 100644 --- a/app/models/enterprise_group.rb +++ b/app/models/enterprise_group.rb @@ -74,11 +74,6 @@ class EnterpriseGroup < ApplicationRecord permalink end - # Remove any unsupported HTML. - def long_description - HtmlSanitizer.sanitize_and_enforce_link_target_blank(super) - end - # Remove any unsupported HTML. def long_description=(html) super(HtmlSanitizer.sanitize_and_enforce_link_target_blank(html)) diff --git a/app/models/spree/product.rb b/app/models/spree/product.rb index 57f765413c..bb1f2d2f59 100755 --- a/app/models/spree/product.rb +++ b/app/models/spree/product.rb @@ -279,11 +279,6 @@ module Spree end # rubocop:enable Metrics/AbcSize - # Remove any unsupported HTML. - def description - HtmlSanitizer.sanitize(super) - end - # Remove any unsupported HTML. def description=(html) super(HtmlSanitizer.sanitize(html)) diff --git a/spec/models/custom_tab_spec.rb b/spec/models/custom_tab_spec.rb index 52fa70c38a..7ee37614cf 100644 --- a/spec/models/custom_tab_spec.rb +++ b/spec/models/custom_tab_spec.rb @@ -18,10 +18,5 @@ RSpec.describe CustomTab do subject.content = "Hello dearest monster." expect(subject.content).to eq "Hello alert dearest monster." end - - it "sanitises existing HTML in content" do - subject[:content] = "Hello dearest monster." - expect(subject.content).to eq "Hello alert dearest monster." - end end end diff --git a/spec/models/enterprise_group_spec.rb b/spec/models/enterprise_group_spec.rb index aa2c10f2ed..7e7c5fd95c 100644 --- a/spec/models/enterprise_group_spec.rb +++ b/spec/models/enterprise_group_spec.rb @@ -124,10 +124,5 @@ RSpec.describe EnterpriseGroup do subject.long_description = "Hello dearest monster." expect(subject.long_description).to eq "Hello alert dearest monster." end - - it "sanitises existing HTML in long_description" do - subject[:long_description] = "Hello dearest monster." - expect(subject.long_description).to eq "Hello alert dearest monster." - end end end diff --git a/spec/models/spree/product_spec.rb b/spec/models/spree/product_spec.rb index df80c8f052..b51a4736f1 100644 --- a/spec/models/spree/product_spec.rb +++ b/spec/models/spree/product_spec.rb @@ -707,11 +707,6 @@ module Spree subject.description = "Hello dearest monster." expect(subject.description).to eq "Hello alert dearest monster." end - - it "sanitises existing HTML in description" do - subject[:description] = "Hello dearest monster." - expect(subject.description).to eq "Hello alert dearest monster." - end end end