summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-03-15 10:36:56 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-03-15 10:36:56 +0000
commit995ae083cd53696297d6adecf5a209d736ab4166 (patch)
treede1bff593bdbb56ac51e599a66a96ef74606126c /app/controllers
parentd7729d6d4f3acc81e3adc87a2d22557ff5e21d9c (diff)
downloadredmine-995ae083cd53696297d6adecf5a209d736ab4166.tar.gz
redmine-995ae083cd53696297d6adecf5a209d736ab4166.zip
Fixed flawed regexp for removing pre blocks when quoting notes (#16353).
Patch by Stephane Lapie. git-svn-id: http://svn.redmine.org/redmine/trunk@12969 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/journals_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/journals_controller.rb b/app/controllers/journals_controller.rb
index fc4edae21..fe1c01907 100644
--- a/app/controllers/journals_controller.rb
+++ b/app/controllers/journals_controller.rb
@@ -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