app/helpers/decidim/proposals/application_helper.rb in decidim-proposals-0.27.0 vs app/helpers/decidim/proposals/application_helper.rb in decidim-proposals-0.27.1
- old
+ new
@@ -98,10 +98,15 @@
((@proposal.official? || @proposal.official_meeting?) && not_from_participatory_text(@proposal))
end
# If the content is safe, HTML tags are sanitized, otherwise, they are stripped.
def render_proposal_body(proposal)
- Decidim::ContentProcessor.render(render_sanitized_content(proposal, :body), "div")
+ sanitized = render_sanitized_content(proposal, :body)
+ if safe_content?
+ Decidim::ContentProcessor.render_without_format(sanitized).html_safe
+ else
+ Decidim::ContentProcessor.render(sanitized, "div")
+ end
end
# Returns :text_area or :editor based on the organization' settings.
def text_editor_for_proposal_body(form)
options = {