class Trenni::Sanitize::Text

Constants

CLOSING

Public Instance Methods

cdata(string) click to toggle source
# File lib/trenni/sanitize/text.rb, line 60
def cdata(string)
end
close_tag(name, offset = nil) click to toggle source
Calls superclass method Trenni::Sanitize::Filter#close_tag
# File lib/trenni/sanitize/text.rb, line 43
def close_tag(name, offset = nil)
        super
        
        if value = CLOSING[name]
                text(value)
        end
end
comment(string) click to toggle source
# File lib/trenni/sanitize/text.rb, line 54
def comment(string)
end
doctype(string) click to toggle source
# File lib/trenni/sanitize/text.rb, line 51
def doctype(string)
end
filter(node) click to toggle source
# File lib/trenni/sanitize/text.rb, line 31
def filter(node)
        if node.name == "br"
                text("\n\n")
        end
        
        if node.name == 'script'
                node.skip!(ALL) # Skip everything including content.
        else
                node.skip!(TAG) # Only skip the tag output, but not the content.
        end
end
instruction(string) click to toggle source
# File lib/trenni/sanitize/text.rb, line 57
def instruction(string)
end