ruby-bbcode-to-md 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,6 +12,14 @@ require 'ruby-bbcode-to-md/bbtree'
12
12
  module RubyBBCode
13
13
  include ::RubyBBCode::Tags
14
14
 
15
+ def disable_validation
16
+ @ignore_validation = true
17
+ end
18
+
19
+ def enable_validation
20
+ @ignore_validation = false
21
+ end
22
+
15
23
  # This method converts the given text (with BBCode tags) into a HTML representation
16
24
  # 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
17
25
  # The additional_tags parameter is used to add additional BBCode tags that should be accepted
@@ -95,6 +103,6 @@ String.class_eval do
95
103
 
96
104
  # Check if string contains valid BBCode. Returns true when valid, else returns array with error(s)
97
105
  def check_bbcode_validity
98
- RubyBBCode.validity_check(self)
106
+ RubyBBCode.validity_check(self) and !@ignore_validation
99
107
  end
100
108
  end
@@ -1,3 +1,3 @@
1
1
  module RubyBbcode
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-bbcode-to-md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -108,7 +108,7 @@ rubyforge_project:
108
108
  rubygems_version: 1.8.23
109
109
  signing_key:
110
110
  specification_version: 3
111
- summary: ruby-bbcode-to-md-0.0.5
111
+ summary: ruby-bbcode-to-md-0.0.6
112
112
  test_files:
113
113
  - test/ruby_bbcode_test.rb
114
114
  - test/test_helper.rb