class String

Public Instance Methods

escape_single_quotes() click to toggle source
# File lib/trust_html/string_ext.rb, line 2
def escape_single_quotes
  self.gsub(/'/, "\\\\'")
end
remove_nonprintable() click to toggle source
# File lib/trust_html/string_ext.rb, line 6
def remove_nonprintable
  self.scan(/[[:print:]]/).join
end