##// END OF EJS Templates
Fixed flawed regexp for removing pre blocks when quoting notes (#16353)....
Jean-Philippe Lang -
r12694:995ae083cd53
parent child
Show More
@@ -66,7 +66,7 class JournalsController < ApplicationController
66 text = @issue.description
66 text = @issue.description
67 end
67 end
68 # Replaces pre blocks with [...]
68 # Replaces pre blocks with [...]
69 text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
69 text = text.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]')
70 @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
70 @content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
71 @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
71 @content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
72 rescue ActiveRecord::RecordNotFound
72 rescue ActiveRecord::RecordNotFound
General Comments 0
You need to be logged in to leave comments. Login now