diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-13 17:46:38 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-13 17:46:38 +0000 |
commit | 0241003590ccf67a5b148c028080b0d8addefb92 (patch) | |
tree | dfd9840b39a83fd362a0dd094dd2f34711a4dd3b /app/controllers/messages_controller.rb | |
parent | d82738ad00af8c2473e8c772346accfff4aeb9fd (diff) | |
download | redmine-0241003590ccf67a5b148c028080b0d8addefb92.tar.gz redmine-0241003590ccf67a5b148c028080b0d8addefb92.zip |
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
Diffstat (limited to 'app/controllers/messages_controller.rb')
-rw-r--r-- | app/controllers/messages_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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{<pre>((.|\s)*?)</pre>}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');" |