]> source.dussan.org Git - redmine.git/commitdiff
Merged r12969 and r12973 (#16353).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 29 Mar 2014 14:41:09 +0000 (14:41 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 29 Mar 2014 14:41:09 +0000 (14:41 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13026 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/journals_controller.rb
app/controllers/messages_controller.rb

index fc4edae2104e77dec4a8c74ca9979708fe175a41..fe1c01907da40b6f23ed4c8f801559f8f9e2a4f7 100644 (file)
@@ -66,7 +66,7 @@ class JournalsController < ApplicationController
       text = @issue.description
     end
     # Replaces pre blocks with [...]
-    text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
+    text = text.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]')
     @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
     @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
   rescue ActiveRecord::RecordNotFound
index 2bbce2d1d5a5e403ec71badc1eb5a4e5468d7dee..0eb9f0bef0c2c62a8d962608809cac5f3ea385d3 100644 (file)
@@ -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