Skip to content

Commit

Permalink
[#967] mark escaped string as html_safe in text type
Browse files Browse the repository at this point in the history
  • Loading branch information
al2o3cr committed Sep 25, 2011
1 parent 3ef3252 commit 76ba85d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hobo_fields/lib/hobo_fields/types/text.rb
Expand Up @@ -6,7 +6,7 @@ class Text < String
COLUMN_TYPE = :text

def to_html(xmldoctype = true)
ERB::Util.html_escape(self).gsub("\n", "<br#{xmldoctype ? ' /' : ''}>\n")
ERB::Util.html_escape(self).gsub("\n", "<br#{xmldoctype ? ' /' : ''}>\n").html_safe
end

HoboFields.register_type(:text, self)
Expand Down

0 comments on commit 76ba85d

Please sign in to comment.