Merge pull request #2998 from evazion/fix-quote-stripping

Fix [quote] stripping for comments, forum post replies.
This commit is contained in:
Albert Yi
2017-04-26 12:43:30 -07:00
committed by GitHub
7 changed files with 50 additions and 46 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