diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index c7c5e59308..f980090e47 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -144,7 +144,7 @@ class MessagesController < ApplicationController subject = @message.subject.gsub('"', '\"') subject = "RE: #{subject}" unless subject.starts_with?('RE:') content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> " - content << text.to_s.strip.gsub(%r{
((.|\s)*?)
}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" + content << text.to_s.strip.gsub(%r{
(.+?)
}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n" respond_to do |format| format.json { render json: { subject: subject, content: content } }