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