diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-03-17 07:49:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-03-17 07:49:14 +0000 |
commit | 4e5bb0e2316708f4d36bb27dd9fb25c4b01c60ba (patch) | |
tree | c64dcd4dc5f96cbe3179396a2b8fdda521789708 /app/controllers/messages_controller.rb | |
parent | b4fd6b47b1ab2cdbba9c89b8b2faa5bdca1b3345 (diff) | |
download | redmine-4e5bb0e2316708f4d36bb27dd9fb25c4b01c60ba.tar.gz redmine-4e5bb0e2316708f4d36bb27dd9fb25c4b01c60ba.zip |
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
Diffstat (limited to 'app/controllers/messages_controller.rb')
-rw-r--r-- | app/controllers/messages_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 2bbce2d1d..0eb9f0bef 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -113,7 +113,7 @@ class MessagesController < ApplicationController @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:') @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 def preview |