struct UserSuppliedContent

Defined in:

user_supplied_content.cr

Constant Summary

ALLOWED_ATTRIBUTES = {"href", "src", "alt"}
ALLOWED_TAGS = {"a", "abbr", "aside", "b", "blockquote", "br", "code", "details", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "img", "kbd", "li", "ol", "p", "pre", "small", "span", "strong", "sub", "summary", "sup", "u", "ul"}

These are Tuples instead of Arrays so that it would be immutable at runtime

OUTPUT_OPTIONS = XML::SaveOptions::AS_HTML | XML::SaveOptions::NO_DECL
PARSE_OPTIONS = (((XML::HTMLParserOptions::RECOVER | XML::HTMLParserOptions::NODEFDTD) | XML::HTMLParserOptions::NOBLANKS) | XML::HTMLParserOptions::NOIMPLIED) | XML::HTMLParserOptions::COMPACT

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : String) #

[View source]

Instance Method Detail

def to_html : String #

[View source]