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
This commit is contained in:
parent
d82738ad00
commit
0241003590
|
@ -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');"
|
||||
|
|
Loading…
Reference in New Issue