diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-25 11:18:34 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-25 11:19:28 -0200 |
commit | 8b3ed2b68ae615523299c5551b4ad6ab8e7f74cf (patch) | |
tree | daaccea6daec6888c653c66b93f2eb73da735cfc | |
parent | 0e7dfbe9a2ffd3ee885b0783b20ebe5fdd4f9eec (diff) | |
download | rails-8b3ed2b68ae615523299c5551b4ad6ab8e7f74cf.tar.gz rails-8b3ed2b68ae615523299c5551b4ad6ab8e7f74cf.tar.bz2 rails-8b3ed2b68ae615523299c5551b4ad6ab8e7f74cf.zip |
Fix HTML escaping in the guides
render :html escapes the argument if not provided as html safe.
-rw-r--r-- | guides/rails_guides/markdown.rb | 2 | ||||
-rw-r--r-- | guides/source/layout.html.erb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index f1e61e485d..009e5aff99 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -158,7 +158,7 @@ module RailsGuides @view.content_for(:header_section) { @header } @view.content_for(:page_title) { @title } @view.content_for(:index_section) { @index } - @view.render(layout: @layout, html: @body) + @view.render(layout: @layout, html: @body.html_safe) end end end diff --git a/guides/source/layout.html.erb b/guides/source/layout.html.erb index 943fd3fd7f..bb50761b30 100644 --- a/guides/source/layout.html.erb +++ b/guides/source/layout.html.erb @@ -88,7 +88,7 @@ <div id="container"> <div class="wrapper"> <div id="mainCol"> - <%= yield.html_safe %> + <%= yield %> <h3>Feedback</h3> <p> |