From 1145a3516c8407a069be0a77c34c4ae3a77974c8 Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Mon, 20 Jun 2016 16:02:25 -0300 Subject: [PATCH] render escaped html --- lib/proposals_discussion_plugin/topic_helper.rb | 2 +- views/content_viewer/proposal.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/proposals_discussion_plugin/topic_helper.rb b/lib/proposals_discussion_plugin/topic_helper.rb index 259b378..90b7022 100644 --- a/lib/proposals_discussion_plugin/topic_helper.rb +++ b/lib/proposals_discussion_plugin/topic_helper.rb @@ -6,7 +6,7 @@ module ProposalsDiscussionPlugin::TopicHelper content_tag(:div, ( content_tag(:div, '', :class=>'topic-color', :style => "background-color: #{topic.color};") + - content_tag(:h2, link_to(image_icon + content_tag(:span, topic.title), topic.view_url)) + content_tag(:h2, link_to(image_icon + content_tag(:span, topic.title).html_safe, topic.view_url)) ), :class => 'topic-title') end diff --git a/views/content_viewer/proposal.html.erb b/views/content_viewer/proposal.html.erb index 05aec92..dfa7faa 100644 --- a/views/content_viewer/proposal.html.erb +++ b/views/content_viewer/proposal.html.erb @@ -1,7 +1,7 @@ <%= show_date(proposal.published_at) %> - <%= _(", by %s") % (proposal.author ? link_to(proposal.author_name, proposal.author_url) : proposal.author_name) %> - <%= _(" - %s") % link_to_comments(proposal) %> + <%= _(", by %s") % (proposal.author ? link_to(proposal.author_name, proposal.author_url).html_safe : proposal.author_name) %> + <%= _(" - %s") % link_to_comments(proposal).html_safe %>
@@ -17,7 +17,7 @@
-
<%= proposal.body %>
+
<%= proposal.body.html_safe %>
<% if proposal.created_by == user && !proposal.published %> -- libgit2 0.21.2