continue forcing Padrino to html_safe everything

This commit is contained in:
Thomas Reynolds 2013-06-12 11:19:02 -07:00
parent 34b354f156
commit a52effc119
6 changed files with 28 additions and 0 deletions

View file

@ -1,5 +1,20 @@
Feature: link_to helper Feature: link_to helper
Scenario: link_to works with blocks (erb)
Given the Server is running at "link-to-app"
When I go to "/link_to_erb.html"
Then I should see "erb <s>with html tags</s>"
Scenario: link_to works with blocks (slim)
Given the Server is running at "link-to-app"
When I go to "/link_to_slim.html"
Then I should see "<s>slim with html tags</s>"
Scenario: link_to works with blocks (haml)
Given the Server is running at "link-to-app"
When I go to "/link_to_haml.html"
Then I should see "<s>haml with html tags</s>"
Scenario: link_to produces relative links Scenario: link_to produces relative links
Given a fixture app "indexable-app" Given a fixture app "indexable-app"
And an empty file named "config.rb" And an empty file named "config.rb"

View file

@ -0,0 +1,3 @@
<% link_to "/" do %>
erb <s>with html tags</s>
<% end %>

View file

@ -0,0 +1,2 @@
- link_to "/" do
%s haml with html tags

View file

@ -0,0 +1,2 @@
- link_to "/" do
s slim with html tags

View file

@ -36,6 +36,12 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
# The helpers # The helpers
helpers do helpers do
# Make all block content html_safe
def content_tag(name, content = nil, options = nil, &block)
mark_safe(super(name, mark_safe(content), options, &block))
end
# Disable Padrino cache buster # Disable Padrino cache buster
def asset_stamp def asset_stamp
false false