about summary refs log tree commit diff stats
path: root/app/helpers/quotes_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/quotes_helper.rb')
-rw-r--r--app/helpers/quotes_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/quotes_helper.rb b/app/helpers/quotes_helper.rb index 3c2acf9..c0753e0 100644 --- a/app/helpers/quotes_helper.rb +++ b/app/helpers/quotes_helper.rb
@@ -2,6 +2,7 @@ module QuotesHelper
2 def quote_format(text) 2 def quote_format(text)
3 text = text ? text.to_str : '' 3 text = text ? text.to_str : ''
4 text = text.dup if text.frozen? 4 text = text.dup if text.frozen?
5 text.gsub!(/^([\(\[][^\]\)]*[\]\)] )?([^:\n]*): /, "\\1<span class=\"quote-speaker\">\\2</span>: ")
5 text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n 6 text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n
6 text.gsub!(/\n/, '<br />') # 1 newline -> br 7 text.gsub!(/\n/, '<br />') # 1 newline -> br
7 text = sanitize(text) 8 text = sanitize(text)