module Forspell::Sanitizer
Constants
- REMOVE_PUNCT
Public Class Methods
sanitize(input)
click to toggle source
# File lib/forspell/sanitizer.rb, line 10 def self.sanitize(input) CGI.unescapeHTML(Sanitize.fragment(input, elements: [], remove_contents: true)) .gsub(REMOVE_PUNCT, '').gsub(%r{[.:]+$}, '') end