Permalink
Browse files

Check string safety in default presenter for column values.

  • Loading branch information...
1 parent c2cc788 commit 85fe9c15a157fc6816e112a6142a4efd32da63c3 @bobbytables committed May 21, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/table_cloth/presenters/default.rb
@@ -49,7 +49,11 @@ def column_for_object(column, object)
td_options.update(options)
end
- td_options[:text] = value
+ if value.html_safe?
+ td_options[:inner_html] = value
+ else
+ td_options[:text] = value
+ end
ElementFactory::Element.new(:td, tag_options(:td).merge(td_options))
end

0 comments on commit 85fe9c1

Please sign in to comment.