lib/ruby-bbcode.rb
# This method parses the given text (with BBCode tags) into a BBTree representation
# The escape_html parameter (default: true) escapes HTML tags that were present in the given text and therefore blocking (mallicious) HTML in the original text
# The additional_tags parameter is used to add additional BBCode tags that should be accepted
# The method parameter determines whether the tags parameter needs to be used to blacklist (when set to :disable) or whitelist (when not set to :disable) the list of BBCode tags
# The method raises an exception when the text could not be parsed due to errors
This method parses the given text (with BBCode tags) into a BBTree representation
The escape_html parameter (default: true) escapes HTML tags that were present in the given text and therefore blocking (mallicious) HTML in the original text
The additional_tags parameter is used to add additional BBCode tags that should be accepted
The method parameter determines whether the tags parameter needs to be used to blacklist (when set to :disable) or whitelist (when not set to :disable) the list of BBCode tags
The method raises an exception when the text could not be parsed due to errors
This method parses the given text ( with BBCode tags ) into a BBTree representation The escape_html parameter ( default : true ) escapes HTML tags that were present in the given text and therefore blocking ( mallicious ) HTML in the original text The additional_tags parameter is used to add additional BBCode tags that should be accepted The method parameter determines whether the tags parameter needs to be used to blacklist ( when set to : disable ) or whitelist ( when not set to : disable ) the list of BBCode tags The method raises an exception when the text could not be parsed due to errors
def parse(text, escape_html = true, additional_tags = {}, method = :disable, *tags)
      text = text.clone
      use_tags = determine_applicable_tags(additional_tags, method, *tags)
      @tag_sifter = TagSifter.new(text, use_tags, escape_html)
      @tag_sifter.process_text
    end
def parse ( text , escape_html = true , additional_tags = { } , method = :disable , * tags ) text = text . clone use_tags = determine_applicable_tags ( additional_tags , method , * tags ) @tag_sifter = TagSifter . new ( text , use_tags , escape_html ) @tag_sifter . process_text end
This method parses the given text (with BBCode tags) into a BBTree representation
The escape_html parameter (default: true) escapes HTML tags that were present in the given text and therefore blocking (mallicious) HTML in the original text
The additional_tags parameter is used to add additional BBCode tags that should be accepted
The method parameter determines whether the tags parameter needs to be used to blacklist (when set to :disable) or whitelist (when not set to :disable) the list of BBCode tags
The method raises an exception when the text could not be parsed due to errors
This method parses the given text ( with BBCode tags ) into a BBTree representation The escape_html parameter ( default : true ) escapes HTML tags that were present in the given text and therefore blocking ( mallicious ) HTML in the original text The additional_tags parameter is used to add additional BBCode tags that should be accepted The method parameter determines whether the tags parameter needs to be used to blacklist ( when set to : disable ) or whitelist ( when not set to : disable ) the list of BBCode tags The method raises an exception when the text could not be parsed due to errors
text
escape_html
additional_tags
method
tags