Skip to content
Snippets Groups Projects
Unverified Commit a2fa81cb authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

sanitizer + fix

parent 63f754d2
No related branches found
No related tags found
No related merge requests found
class Osuny::Sanitizer
include ActionView::Helpers::SanitizeHelper
ALLOWED_TAGS = [
"a", "b", "br", "em", "i", "img", "li", "ol", "p", "strong", "sub", "sup", "ul"
]
ALLOWED_ATTRIBUTES = [
"href", "target", "title"
]
self.sanitized_allowed_tags = Rails.application.config.action_view.sanitized_allowed_tags
self.sanitized_allowed_attributes = Rails.application.config.action_view.sanitized_allowed_attributes
# type(ActiveRecord) = ['text', 'string']
def self.sanitize(input, type = 'text')
......
......@@ -7,7 +7,7 @@ class AddDefaultLanguageToUniversities < ActiveRecord::Migration[7.0]
language ||= Language.find_by(iso_code: 'en')
language ||= Language.first
University.all.update_all(default_language_id: language.id) if University.all.any?
University.all.update_all(default_language_id: language.id) if University.any?
change_column_null :universities, :default_language_id, false
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment