Sha256: 7c4779e5d287cc493997ea4e9888f8d95ba0b4dca4328fbe2fff04479d59b02f
Contents?: true
Size: 515 Bytes
Versions: 14
Compression:
Stored size: 515 Bytes
Contents
module HoboFields module Types class TextileString < HoboFields::Types::Text include SanitizeHtml def to_html(xmldoctype = true) require 'redcloth' if blank? "" else textilized = RedCloth.new(self, [ :hard_breaks ]) textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=") HoboFields::SanitizeHtml.sanitize(textilized.to_html) end end HoboFields.register_type(:textile, self) end end end
Version data entries
14 entries across 14 versions & 1 rubygems