mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
don't escape the plain filter
This commit is contained in:
parent
4cf8161749
commit
b202f66df7
4 changed files with 4 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -13,3 +13,4 @@
|
|||
*.so
|
||||
*.o
|
||||
*.a
|
||||
*.swp
|
||||
|
|
|
@ -18,7 +18,7 @@ module Hamlit
|
|||
type, str = temple
|
||||
case type
|
||||
when :dynamic
|
||||
[:escape, true, [:dynamic, str]]
|
||||
[:escape, false, [:dynamic, str]]
|
||||
else
|
||||
temple
|
||||
end
|
||||
|
|
|
@ -115,7 +115,7 @@ class FiltersTest < Haml::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
test "interpolated code should be escaped if escape_html is set" do; skip
|
||||
test "interpolated code should be escaped if escape_html is set" do
|
||||
assert_haml_ugly(":plain\n \#{'<script>evil</script>'}")
|
||||
end
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ describe Hamlit::Filters do
|
|||
it 'escapes only interpolated content' do
|
||||
assert_render(<<-HTML.unindent, <<-'HAML'.unindent)
|
||||
<script>
|
||||
<script>
|
||||
<script>
|
||||
|
||||
HTML
|
||||
:plain
|
||||
|
|
Loading…
Reference in a new issue