fix escaping in messages, refs #3888
It's unnecessary to html unescape the subject and body anymore, as they are already unescaped. Change-Id: I10b13805a42c677e1309983c77f1aa62e56e8578 Reviewed-on: https://gerrit.instructure.com/2413 Reviewed-by: Bracken Mosbacker <bracken@instructure.com> Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
parent
98bf5f0674
commit
16eecfd4dc
|
@ -264,7 +264,6 @@ class Message < ActiveRecord::Base
|
|||
self.extend TextHelper
|
||||
b = binding
|
||||
|
||||
message = TextHelper.unescape_html(message)
|
||||
self.body = ERB.new(message, nil, "%<>", "@output").result(b).strip
|
||||
if path_type == 'email'
|
||||
message = File.read(Canvas::MessageHelper.find_message_path('_email_footer.email.erb'))
|
||||
|
@ -272,7 +271,6 @@ class Message < ActiveRecord::Base
|
|||
self.body = self.body + "\n\n\n\n\n\n________________________________________\n" + comm_message if comm_message
|
||||
end
|
||||
self.subject = @message_content_subject || "Canvas Alert"
|
||||
self.subject = TextHelper.unescape_html(self.subject)
|
||||
self.url = @message_content_link || nil
|
||||
self.body
|
||||
else
|
||||
|
@ -281,8 +279,6 @@ class Message < ActiveRecord::Base
|
|||
main_link = ERB.new(self.notification.main_link || "", nil, "%<>").result(b)
|
||||
b = binding
|
||||
self.subject = ERB.new(self.subject, nil, "%<>").result(b)
|
||||
self.subject = TextHelper.unescape_html(self.subject)
|
||||
self.body = TextHelper.unescape_html(self.body)
|
||||
self.body = ERB.new(self.body, nil, "%<>").result(b)
|
||||
self.transmission_errors = "couldn't find #{path}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue