continue forcing Padrino to html_safe everything
This commit is contained in:
parent
34b354f156
commit
a52effc119
|
@ -1,5 +1,20 @@
|
|||
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
|
||||
Given a fixture app "indexable-app"
|
||||
And an empty file named "config.rb"
|
||||
|
|
0
middleman-core/fixtures/link-to-app/config.rb
Normal file
0
middleman-core/fixtures/link-to-app/config.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
<% link_to "/" do %>
|
||||
erb <s>with html tags</s>
|
||||
<% end %>
|
|
@ -0,0 +1,2 @@
|
|||
- link_to "/" do
|
||||
%s haml with html tags
|
|
@ -0,0 +1,2 @@
|
|||
- link_to "/" do
|
||||
s slim with html tags
|
|
@ -36,6 +36,12 @@ class Middleman::CoreExtensions::DefaultHelpers < ::Middleman::Extension
|
|||
|
||||
# The helpers
|
||||
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
|
||||
def asset_stamp
|
||||
false
|
||||
|
|
Loading…
Reference in a new issue