mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-07 23:44:55 +08:00
13 lines
284 B
Ruby
13 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
|