@@ -94,10 +94,11 class MessagesController < ApplicationController | |||
|
94 | 94 | user = @message.author |
|
95 | 95 | text = @message.content |
|
96 | 96 | subject = @message.subject.gsub('"', '\"') |
|
97 | subject = "RE: #{subject}" unless subject.starts_with?('RE:') | |
|
97 | 98 | content = "#{ll(Setting.default_language, :text_user_wrote, user)}\\n> " |
|
98 | 99 | content << text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub('"', '\"').gsub(/(\r?\n|\r\n?)/, "\\n> ") + "\\n\\n" |
|
99 | 100 | render(:update) { |page| |
|
100 |
page << "$('reply_subject').value = \" |
|
|
101 | page << "$('reply_subject').value = \"#{subject}\";" | |
|
101 | 102 | page.<< "$('message_content').value = \"#{content}\";" |
|
102 | 103 | page.show 'reply' |
|
103 | 104 | page << "Form.Element.focus('message_content');" |
General Comments 0
You need to be logged in to leave comments.
Login now