Sha256: 76d0ed06124064280289060dbfc1b2f3eb42e4b7008a841bff75270e794b597e
Contents?: true
Size: 507 Bytes
Versions: 43
Compression:
Stored size: 507 Bytes
Contents
require 'redcloth' module HoboFields module Types class TextileString < HoboFields::Types::Text include SanitizeHtml def to_html(xmldoctype = true) 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
43 entries across 43 versions & 1 rubygems