Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix 894 sanitize html in HtmlText tiles

  • Loading branch information...
commit 1daf6bdea65783b945d4d20f574561a4c210e47e 1 parent 0367ea6
@mfrederickson mfrederickson authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/views/contents/html_text/_render_tile.html.erb
View
7 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.
Something went wrong with that request. Please try again.