From 8b3ed2b68ae615523299c5551b4ad6ab8e7f74cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 25 Oct 2016 11:18:34 -0200 Subject: [PATCH] Fix HTML escaping in the guides render :html escapes the argument if not provided as html safe. --- guides/rails_guides/markdown.rb | 2 +- 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 @@
- <%= yield.html_safe %> + <%= yield %>

Feedback