comments: use server-side quote-stripping instead of reimplementing in js.

This commit is contained in:
evazion
2017-04-24 19:37:50 -05:00
parent 18424531fa
commit 869f1610fc
5 changed files with 12 additions and 20 deletions

View File

@@ -249,6 +249,10 @@ class Comment < ActiveRecord::Base
def undelete!
update({ :is_deleted => false }, :as => CurrentUser.role)
end
def quoted_response
DText.quote(body, creator_name)
end
end
Comment.connection.extend(PostgresExtensions)

View File

@@ -234,8 +234,7 @@ class ForumPost < ActiveRecord::Base
end
def quoted_response
stripped_body = DText.strip_blocks(body, "quote")
"[quote]\n#{creator_name} said:\n\n#{stripped_body}\n[/quote]\n\n"
DText.quote(body, creator_name)
end
def forum_topic_page