From: Jean-Philippe Lang Date: Fri, 13 Nov 2009 17:46:38 +0000 (+0000) Subject: Fixed: Quoting in forums does not take the subject from the message being quoted... X-Git-Tag: 0.9.0~215 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0241003590ccf67a5b148c028080b0d8addefb92;p=redmine.git Fixed: Quoting in forums does not take the subject from the message being quoted (#4215). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3035 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index 88609738a..7dd0fbec9 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -93,9 +93,11 @@ class MessagesController < ApplicationController def quote user = @message.author text = @message.content + subject = @message.subject.gsub('"', '\"') 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" render(:update) { |page| + page << "$('reply_subject').value = \"RE: #{subject}\";" page.<< "$('message_content').value = \"#{content}\";" page.show 'reply' page << "Form.Element.focus('message_content');"