Skip to content

Commit

Permalink
fix 894 sanitize html in HtmlText tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrederickson committed Mar 3, 2014
1 parent 0367ea6 commit 1daf6bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/views/contents/html_text/_render_tile.html.erb
@@ -1,3 +1,8 @@
<div class="default-padding">
<%=raw content.data %>
<%=
# some html such as div can throw off the anchor tags and cause the tile not to render properly
ActionController::Base.helpers.sanitize(content.data,
:tags => %w(h1 h2 h3 h4 b br i em li ol u ul p q small strong),
:attributes => %w(style class)) unless content.data.nil?
%>
</div>

0 comments on commit 1daf6bd

Please sign in to comment.