Merge remote-tracking branch 'origin/dev' into dev

pull/9448/head
Oliver Günther 3 years ago
commit 889f7971cf
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 2
      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{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
content << text.to_s.strip.gsub(%r{<pre>(.+?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
respond_to do |format|
format.json { render json: { subject: subject, content: content } }

Loading…
Cancel
Save