Navigation Menu

Skip to content

Commit

Permalink
Remove haml_filter <script> tags in output
Browse files Browse the repository at this point in the history
  • Loading branch information
codepuzzle committed Feb 29, 2012
1 parent f511ab0 commit 6c225ca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/barista/haml_filter.rb
Expand Up @@ -15,11 +15,12 @@ def render_with_options(text, options)
inner = Barista::Compiler.compile(text)
end
output = []
output << "<script type=#{options[:attr_wrapper]}#{content_type(type)}#{options[:attr_wrapper]}>"
output << " #{cdata_wrapper % '<![CDATA['}"
# We need blank coffeescript output for our use-case
#output << "<script type=#{options[:attr_wrapper]}#{content_type(type)}#{options[:attr_wrapper]}>"
#output << " #{cdata_wrapper % '<![CDATA['}"
output << " #{inner}".rstrip.gsub("\n", "\n ")
output << " #{cdata_wrapper % ']]>'}"
output << "</script>"
#output << " #{cdata_wrapper % ']]>'}"
#output << "</script>"
output.join("\n")
end

Expand All @@ -40,4 +41,4 @@ def self.setup
end
end
end
end
end

0 comments on commit 6c225ca

Please sign in to comment.