mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
14 lines
284 B
Ruby
14 lines
284 B
Ruby
module InputSanitizeHelper
|
|
def sanitize_input(text)
|
|
ActionController::Base.helpers.sanitize(
|
|
text,
|
|
tags: Constants::WHITELISTED_TAGS,
|
|
attributes: Constants::WHITELISTED_ATTRIBUTES
|
|
)
|
|
end
|
|
|
|
def escape_input(text)
|
|
ERB::Util.html_escape(text)
|
|
end
|
|
end
|