##// END OF EJS Templates
Fixed flawed regexp for removing pre blocks when quoting messages (#16353)....
Jean-Philippe Lang -
r12698:4e5bb0e23167
parent child
Show More
@@ -113,7 +113,7 class MessagesController < ApplicationController
113 @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
113 @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
114
114
115 @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
115 @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
116 @content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
116 @content << @message.content.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
117 end
117 end
118
118
119 def preview
119 def preview
General Comments 0
You need to be logged in to leave comments. Login now