Fixed flawed regexp for removing pre blocks when quoting messages (#16353).

git-svn-id: http://svn.redmine.org/redmine/trunk@12973 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2014-03-17 07:49:14 +00:00
parent b4fd6b47b1
commit 4e5bb0e231
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class MessagesController < ApplicationController
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> " @content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" @content << @message.content.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
end end
def preview def preview