def sanitize content  #:nodoc:
      if content.is_a? String
        content.chomp!
        # 2013-03-20 - 18:29 187compat
        if content.respond_to? :encode
          content.replace(content.encode("ASCII-8BIT", :invalid => :replace, :undef => :replace, :replace => "?"))
        end
        content.gsub!(/[\t\r\n]/, '  ') # don't display tab, newline
        content.gsub!(/\n/, '  ') # don't display tab, newline
        content.gsub!(/[^[:print:]]/, '')  # don't display non print characters
      else
        content
      end
    end
def sanitize content  #:nodoc:
      if content.is_a? String
        content.chomp!
        # 2013-03-20 - 18:29 187compat
        if content.respond_to? :encode
          content.replace(content.encode("ASCII-8BIT", :invalid => :replace, :undef => :replace, :replace => "?"))
        end
        content.gsub!(/[\t\r\n]/, '  ') # don't display tab, newline
        content.gsub!(/\n/, '  ') # don't display tab, newline
        content.gsub!(/[^[:print:]]/, '')  # don't display non print characters
      else
        content
      end
    end
takes a block, this way anyone extending this class can just pass a block to do his job
 This modifies the string