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

@@ -12,6 +12,11 @@ class DText
CGI.escapeHTML(string)
end
def self.quote(message, creator_name)
stripped_body = DText.strip_blocks(message, "quote")
"[quote]\n#{creator_name} said:\n\n#{stripped_body}\n[/quote]\n\n"
end
def self.strip_blocks(string, tag)
n = 0
stripped = ""