]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Quoting in forums does not take the subject from the message being quoted...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 13 Nov 2009 17:46:38 +0000 (17:46 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 13 Nov 2009 17:46:38 +0000 (17:46 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3035 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/messages_controller.rb

index 88609738a9fd0552883b5ddcadf35c1af2f17adf..7dd0fbec9bb786f36fd5860bfb043a6aa95cb4ac 100644 (file)
@@ -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');"