diff --git a/REFERENCE.md b/REFERENCE.md index 4b306714..08f78956 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1126,7 +1126,7 @@ is compiled to Note that `#{}` interpolation within filters is HTML-escaped if you specify -{Haml::Options#escape_interpolated_html `:escape_interpolated_html`} option. +{Haml::Options#escape_filter_interpolations `:escape_filter_interpolations`} option. The functionality of some filters such as Markdown can be provided by many different libraries. Usually you don't have to worry about this - you can just diff --git a/lib/haml/filters.rb b/lib/haml/filters.rb index d6f06d43..c0574db1 100644 --- a/lib/haml/filters.rb +++ b/lib/haml/filters.rb @@ -164,8 +164,8 @@ module Haml if contains_interpolation?(text) return if options[:suppress_eval] - escape = options[:escape_interpolated_html] - # `escape_interpolated_html` defaults to `escape_html` if unset. + escape = options[:escape_filter_interpolations] + # `escape_filter_interpolations` defaults to `escape_html` if unset. escape = options[:escape_html] if escape.nil? text = unescape_interpolation(text, escape).gsub(/(\\+)n/) do |s| diff --git a/lib/haml/options.rb b/lib/haml/options.rb index 2a8c4ab8..b2a8f34e 100644 --- a/lib/haml/options.rb +++ b/lib/haml/options.rb @@ -8,7 +8,7 @@ module Haml @valid_formats = [:html4, :html5, :xhtml] @buffer_option_keys = [:autoclose, :preserve, :attr_wrapper, :format, - :encoding, :escape_html, :escape_interpolated_html, :escape_attrs, :hyphenate_data_attrs, :cdata] + :encoding, :escape_html, :escape_filter_interpolations, :escape_attrs, :hyphenate_data_attrs, :cdata] # The default option values. # @return Hash @@ -90,7 +90,7 @@ module Haml # {file:REFERENCE.md#unescaping_html Unescaping HTML}. # # Defaults to the current value of `escape_html`. - attr_accessor :escape_interpolated_html + attr_accessor :escape_filter_interpolations # The name of the Haml file being parsed. # This is only used as information when exceptions are raised. This is diff --git a/lib/haml/temple_engine.rb b/lib/haml/temple_engine.rb index e3f730aa..8ccd0db4 100644 --- a/lib/haml/temple_engine.rb +++ b/lib/haml/temple_engine.rb @@ -13,7 +13,7 @@ module Haml encoding: nil, escape_attrs: true, escape_html: false, - escape_interpolated_html: nil, + escape_filter_interpolations: nil, filename: '(haml)', format: :html5, hyphenate_data_attrs: true,