blob: 3c2acf91760f936522421ad1fde90a9fe33a5aea (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
 | module QuotesHelper
  def quote_format(text)
    text = text ? text.to_str : ''
    text = text.dup if text.frozen?
    text.gsub!(/\r\n?/, "\n")                    # \r\n and \r -> \n
    text.gsub!(/\n/, '<br />') # 1 newline   -> br
    text = sanitize(text)
    text = auto_link(text, :link => :urls)
    text
  end
end
 |