Files
openfoodnetwork/app/models/custom_tab.rb
Maikel Linke d2e5087668 Remove redundant HTML sanitisation
We don't need to run the sanitiser each time we read an attribute. It's
a waste of time.
2024-10-24 08:47:11 +11:00

13 lines
259 B
Ruby

# frozen_string_literal: false
class CustomTab < ApplicationRecord
belongs_to :enterprise
validates :title, presence: true, length: { maximum: 20 }
# Remove any unsupported HTML.
def content=(html)
super(HtmlSanitizer.sanitize(html))
end
end