mumukit-content-type 1.5.1 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 359500f7b74e2c5b6738b9be190e486532a23d30e7cca751917889fe49b9d74b
4
- data.tar.gz: 665ae707c465dd76bcbc98c538a425ad3106288b341eee2de7a06653ae5ff00f
3
+ metadata.gz: 327af1f4750e66270d5448bd48af28bd7dd96e1b962d9c1ce34de32f58b348ec
4
+ data.tar.gz: 3682f164134dd03b871167b6722cedc3f20abf8e7784566c508e7835f55a3ccb
5
5
  SHA512:
6
- metadata.gz: adb2eb8ff7b0d89b9ea6142914b795f67a0003d03624b9d8c1af260d150b43616234f3fc7882597c4149ab25a507f269df946643a3b4b77a978c96319064523c
7
- data.tar.gz: 7b0194853aeb4eae90cf6aa8271da357bd7f583d4c4517c081b9e0eb26be54e28eaefdb65fbe3e668057482570302f24f3549600000bdeb94ca82f5c7ad2e2b9
6
+ metadata.gz: 43b2562fa89d3b5a4a5bbaa60a67aa129709d9617972022834317abdede19725181ba62697edab8746c6aafe0ebaac1c550d6511d9856cbc2092863665b314d3
7
+ data.tar.gz: df6681d4115bfe75e5dab267cecd77becaab075b2ca7ab101ecb561bb5066186730e18998cd23bbce650df76f2644cb97addd2395d318e726db369ceb99ac152
@@ -2,7 +2,7 @@ require 'sanitize'
2
2
 
3
3
  module Mumukit::ContentType::Sanitizer
4
4
  class << self
5
- class_attribute :should_sanitize, :allowed_elements, :allowed_attributes
5
+ class_attribute :should_sanitize, :allowed_elements, :allowed_attributes, :transformers
6
6
 
7
7
  self.should_sanitize = false
8
8
  self.allowed_elements = []
@@ -10,6 +10,8 @@ module Mumukit::ContentType::Sanitizer
10
10
  'a' => Sanitize::Config::RELAXED[:attributes]['a'] + ['target']
11
11
  }
12
12
 
13
+ self.transformers = []
14
+
13
15
  def sanitize(html)
14
16
  return html unless should_sanitize?
15
17
 
@@ -20,10 +22,12 @@ module Mumukit::ContentType::Sanitizer
20
22
  Sanitize::Config.merge(Sanitize::Config::RELAXED, custom_sanitization_settings)
21
23
  end
22
24
 
25
+
23
26
  def custom_sanitization_settings
24
27
  {
25
28
  elements: Sanitize::Config::RELAXED[:elements] + allowed_elements,
26
- attributes: allowed_attributes
29
+ attributes: allowed_attributes,
30
+ transformers: transformers
27
31
  }
28
32
  end
29
33
  end
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module ContentType
3
- VERSION = '1.5.1'
3
+ VERSION = '1.6.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumukit-content-type
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-29 00:00:00.000000000 Z
11
+ date: 2019-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -1040,8 +1040,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1040
1040
  - !ruby/object:Gem::Version
1041
1041
  version: '0'
1042
1042
  requirements: []
1043
- rubyforge_project:
1044
- rubygems_version: 2.7.8
1043
+ rubygems_version: 3.0.3
1045
1044
  signing_key:
1046
1045
  specification_version: 4
1047
1046
  summary: Content Type handling for Mumuki