haml-edge 2.3.18 → 2.3.19

Sign up to get free protection for your applications and to get access to all the features.
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.18
1
+ 2.3.19
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.18
1
+ 2.3.19
data/lib/haml/filters.rb CHANGED
@@ -100,7 +100,7 @@ module Haml
100
100
  if contains_interpolation?(text)
101
101
  return if options[:suppress_eval]
102
102
 
103
- push_script <<RUBY
103
+ push_script <<RUBY, :escape_html => false
104
104
  find_and_preserve(#{filter.inspect}.render_with_options(#{unescape_interpolation(text)}, _hamlout.options))
105
105
  RUBY
106
106
  return
@@ -430,6 +430,19 @@ HAML
430
430
  assert_equal("<a href='#'></a>\n", render('%a(href="#")'))
431
431
  end
432
432
 
433
+ def test_javascript_filter_with_dynamic_interp_and_escape_html
434
+ assert_equal(<<HTML, render(<<HAML, :escape_html => true))
435
+ <script type='text/javascript'>
436
+ //<![CDATA[
437
+ & < > &
438
+ //]]>
439
+ </script>
440
+ HTML
441
+ :javascript
442
+ & < > \#{"&"}
443
+ HAML
444
+ end
445
+
433
446
  # HTML escaping tests
434
447
 
435
448
  def test_ampersand_equals_should_escape
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.18
4
+ version: 2.3.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum