strip_html to ignore comments with html tags. fixes #1650

This commit is contained in:
Jason Normore
2012-06-11 10:32:12 -04:00
parent 40cc799f3d
commit 515b31158e
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ module Liquid
end
def strip_html(input)
input.to_s.gsub(/<script.*?<\/script>/, '').gsub(/<.*?>/, '')
input.to_s.gsub(/<script.*?<\/script>/, '').gsub(/<!--.*?-->/, '').gsub(/<.*?>/, '')
end
# Remove all newlines from the string