##// END OF EJS Templates
Fixed that "RE:" prefix is added to the subject each time the message is quoted (#4215)....
Jean-Philippe Lang -
r2924:326ed79b432a
parent child
Show More
@@ -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 = \"RE: #{subject}\";"
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