mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-12 23:40:45 -07:00
Merge branch 'strip-html' of https://github.com/joliss/liquid into joliss-strip-html
Conflicts: lib/liquid/standardfilters.rb
This commit is contained in:
@@ -65,7 +65,7 @@ module Liquid
|
||||
end
|
||||
|
||||
def strip_html(input)
|
||||
input.to_s.gsub(/<script.*?<\/script>/, '').gsub(/<!--.*?-->/, '').gsub(/<.*?>/, '')
|
||||
input.to_s.gsub(/<script.*?<\/script>/m, '').gsub(/<!--.*?-->/m, '').gsub(/<.*?>/m, '')
|
||||
end
|
||||
|
||||
# Remove all newlines from the string
|
||||
@@ -73,7 +73,6 @@ module Liquid
|
||||
input.to_s.gsub(/\r?\n/, '')
|
||||
end
|
||||
|
||||
|
||||
# Join elements of the array with certain character between them
|
||||
def join(input, glue = ' ')
|
||||
[input].flatten.join(glue)
|
||||
|
||||
Reference in New Issue
Block a user