Skip to content

Commit

Permalink
Make the output of stylesheet_link_tag etc. html_safe
Browse files Browse the repository at this point in the history
  • Loading branch information
skade committed Jan 31, 2013
1 parent 2562ddc commit 0f179db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb
Expand Up @@ -294,7 +294,7 @@ def stylesheet_link_tag(*sources)
options.reverse_merge!(:media => 'screen', :rel => 'stylesheet', :type => 'text/css')
sources.flatten.map { |source|
tag(:link, options.reverse_merge(:href => asset_path(:css, source)))
}.join("\n")
}.join("\n").html_safe
end

##
Expand All @@ -317,7 +317,7 @@ def javascript_include_tag(*sources)
options.reverse_merge!(:type => 'text/javascript')
sources.flatten.map { |source|
content_tag(:script, nil, options.reverse_merge(:src => asset_path(:js, source)))
}.join("\n")
}.join("\n").html_safe
end

##
Expand Down
Expand Up @@ -166,7 +166,7 @@ def fields_for(child_association, instance_or_collection=nil, &block)
result = nested_objects.each_with_index.map do |child_instance, index|
nested_options[:index] = include_index ? index : nil
@template.fields_for(child_instance, { :nested => nested_options }, &block)
end.join("\n")
end.join("\n").html_safe
end

protected
Expand Down

0 comments on commit 0f179db

Please sign in to comment.