Fix content_tag helper, only try to mark content as safe if it is not a hash of options

This commit is contained in:
Manuel Meurer 2013-06-18 10:12:38 +02:00
parent 0e69928939
commit c75e31ae94

View file

@ -50,7 +50,8 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
# Make all block content html_safe # Make all block content html_safe
def content_tag(name, content = nil, options = nil, &block) def content_tag(name, content = nil, options = nil, &block)
mark_safe(super(name, mark_safe(content), options, &block)) content = mark_safe(content) unless content.is_a?(Hash)
mark_safe(super(name, content, options, &block))
end end
def capture_html(*args, &block) def capture_html(*args, &block)