remove unexpected HTML instead of converting it to text

This commit is contained in:
ccd0 2014-08-28 22:39:50 -07:00
parent daaf589f1a
commit 4cc724cee4

View File

@ -3,7 +3,7 @@ Build =
spoilerRange: {}
unescape: (text) ->
return text unless text?
text.replace /&(amp|#039|quot|lt|gt);/g, (c) ->
text.replace(/<[^>]*>/g, '').replace /&(amp|#039|quot|lt|gt);/g, (c) ->
{'&amp;': '&', '&#039;': "'", '&quot;': '"', '&lt;': '<', '&gt;': '>'}[c]
shortFilename: (filename, isReply) ->
threshold = 30