Skip to content

Commit

Permalink
checklist、list、paragrah、quote调整html过滤规则允许del(删除线)、u(下划线)标签 (xiaohui-z…
Browse files Browse the repository at this point in the history
  • Loading branch information
breezes1 authored Jul 8, 2020
1 parent 6ce1c20 commit 8dab60c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
24 changes: 12 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
editor_js (0.3.1)
editor_js (0.3.2)
actionview (>= 4)
activesupport (>= 4)
coderay (~> 1.1, >= 1.1.2)
Expand All @@ -13,13 +13,13 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionview (6.0.3.1)
activesupport (= 6.0.3.1)
actionview (6.0.3.2)
activesupport (= 6.0.3.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activesupport (6.0.3.1)
activesupport (6.0.3.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
Expand All @@ -30,25 +30,25 @@ GEM
ast (2.4.0)
builder (3.2.4)
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.5)
concurrent-ruby (1.1.6)
crass (1.0.6)
diff-lcs (1.3)
docile (1.3.2)
erubi (1.9.0)
htmlentities (4.3.4)
i18n (1.7.0)
i18n (1.8.3)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.4)
json (2.3.0)
json-schema (2.8.1)
addressable (>= 2.4)
loofah (2.5.0)
loofah (2.6.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.14.1)
nokogiri (1.10.9)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
nokogumbo (2.0.2)
nokogiri (~> 1.8, >= 1.8.4)
Expand All @@ -58,7 +58,7 @@ GEM
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (4.0.3)
public_suffix (4.0.5)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
Expand Down Expand Up @@ -88,7 +88,7 @@ GEM
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7)
ruby-progressbar (1.10.1)
sanitize (5.1.0)
sanitize (5.2.1)
crass (~> 1.0.2)
nokogiri (>= 1.8.0)
nokogumbo (~> 2.0)
Expand All @@ -101,7 +101,7 @@ GEM
tzinfo (1.2.7)
thread_safe (~> 0.1)
unicode-display_width (1.6.0)
zeitwerk (2.2.2)
zeitwerk (2.3.1)

PLATFORMS
ruby
Expand Down
2 changes: 2 additions & 0 deletions lib/editor_js/blocks/checklist_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def sanitize!
safe_tags = {
'b' => nil,
'i' => nil,
'u' => ['class'],
'del' => ['class'],
'a' => ['href'],
'mark' => ['class'],
'code' => ['class']
Expand Down
2 changes: 2 additions & 0 deletions lib/editor_js/blocks/list_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def sanitize!
safe_tags = {
'b' => nil,
'i' => nil,
'u' => ['class'],
'del' => ['class'],
'a' => ['href'],
'mark' => ['class'],
'code' => ['class']
Expand Down
2 changes: 2 additions & 0 deletions lib/editor_js/blocks/paragraph_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def sanitize!
safe_tags = {
'b' => nil,
'i' => nil,
'u' => ['class'],
'del' => ['class'],
'a' => ['href'],
'mark' => ['class'],
'code' => ['class']
Expand Down
2 changes: 2 additions & 0 deletions lib/editor_js/blocks/quote_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def sanitize!
safe_tags = {
'b' => nil,
'i' => nil,
'u' => ['class'],
'del' => ['class'],
'a' => ['href'],
'mark' => ['class'],
'code' => ['class'],
Expand Down
2 changes: 1 addition & 1 deletion lib/editor_js/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module EditorJs
VERSION = '0.3.1'
VERSION = '0.3.2'
end

0 comments on commit 8dab60c

Please sign in to comment.