test/haml/template_test.rb in haml-edge-2.3.159 vs test/haml/template_test.rb in haml-edge-2.3.160
- old
+ new
@@ -307,9 +307,23 @@
end
end
## Regression
+ def test_xss_protection_with_nested_haml_tag
+ assert_equal(<<HTML, render(<<HAML, :action_view))
+<div>
+ <ul>
+ <li>Content!</li>
+ </ul>
+</div>
+HTML
+- haml_tag :div do
+ - haml_tag :ul do
+ - haml_tag :li, "Content!"
+HAML
+ end
+
def test_xss_protection_with_form_for
assert_equal(<<HTML, render(<<HAML, :action_view))
<form action="" method="post">
Title:
<input id="article_title" name="article[title]" size="30" type="text" value="Hello" />