mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Liquid strip_html strips out the content of <script> tags. [#173 state:resolved]
This commit is contained in:
committed by
James MacAulay
parent
fce8bcb1e7
commit
d87500bfe3
@@ -48,7 +48,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def strip_html(input)
|
||||
input.to_s.gsub(/<.*?>/, '')
|
||||
input.to_s.gsub(/<script.*?<\/script>/, '').gsub(/<.*?>/, '')
|
||||
end
|
||||
|
||||
# Remove all newlines from the string
|
||||
|
||||
Reference in New Issue
Block a user