1
0
Fork 0
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:
Maxim Ivanov 2016-08-30 12:43:44 -04:00
parent 4cf8161749
commit b202f66df7
4 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -13,3 +13,4 @@
*.so
*.o
*.a
*.swp

View file

@ -18,7 +18,7 @@ module Hamlit
type, str = temple
case type
when :dynamic
[:escape, true, [:dynamic, str]]
[:escape, false, [:dynamic, str]]
else
temple
end

View file

@ -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

View file

@ -14,7 +14,7 @@ describe Hamlit::Filters do
it 'escapes only interpolated content' do
assert_render(<<-HTML.unindent, <<-'HAML'.unindent)
<script>
&lt;script&gt;
<script>
HTML
:plain