html-pipeline 2.1.0 → 2.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef883e1a02e6690f3f708437f0750d38be6e26a7
4
- data.tar.gz: c821156250cf94cbbf7a5d219bb6d10b3df77dbf
3
+ metadata.gz: 9d515d3d9dbc769c66a3ae66ef926e3830cca11c
4
+ data.tar.gz: 5fd602dedaedd903cb4743a7899dae8f5a5100cb
5
5
  SHA512:
6
- metadata.gz: 066dbba5d1a4c96b94a4eab74f0e6e1f81156362e05dec76e1b798489a8bdfb87db150bbe093b4c9e11cddc791a483d1bfbcc3ef2d0e43dec4df6f8d96b57f2c
7
- data.tar.gz: 14e260bd46d314003cfd680d87f59660b584911e6646890a437afdfcf5e384f25bc06004d681886d3ae249ef3ff20ed8ddfc377e86ec5bfc0a4a5f585993d17a
6
+ metadata.gz: c13a51e0c20a6913765edf1fc8db5471f393e172eb23289df2c6274ac8c5164cda15a6fe8a84570ac2f85c0d783bb8d2f9d5e3c8573ce14864353bc6b7ed43a8
7
+ data.tar.gz: dea7bfd41ded48841ce1781338c7a1455c4548423d0d9231e2b1bab2477d850615caf2cad77d7ad02c205330d7d24a923fd3c59d9bedc88f65c78a2a3501fcd3
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.2.0
4
+
5
+ * Only allow cite attribute on blockquote and restrict schemes [#223](https://github.com/jch/html-pipeline/pull/223)
6
+
3
7
  ## 2.1.0
4
8
 
5
9
  * Whitelist schemes for longdesc [#221](https://github.com/jch/html-pipeline/pull/221)
@@ -49,30 +49,38 @@ module HTML
49
49
  ),
50
50
  :remove_contents => ['script'],
51
51
  :attributes => {
52
- 'a' => ['href'],
53
- 'img' => ['src', 'longdesc'],
54
- 'div' => ['itemscope', 'itemtype'],
55
- :all => ['abbr', 'accept', 'accept-charset',
56
- 'accesskey', 'action', 'align', 'alt', 'axis',
57
- 'border', 'cellpadding', 'cellspacing', 'char',
58
- 'charoff', 'charset', 'checked', 'cite',
59
- 'clear', 'cols', 'colspan', 'color',
60
- 'compact', 'coords', 'datetime', 'dir',
61
- 'disabled', 'enctype', 'for', 'frame',
62
- 'headers', 'height', 'hreflang',
63
- 'hspace', 'ismap', 'label', 'lang',
64
- 'maxlength', 'media', 'method',
65
- 'multiple', 'name', 'nohref', 'noshade',
66
- 'nowrap', 'open', 'prompt', 'readonly', 'rel', 'rev',
67
- 'rows', 'rowspan', 'rules', 'scope',
68
- 'selected', 'shape', 'size', 'span',
69
- 'start', 'summary', 'tabindex', 'target',
70
- 'title', 'type', 'usemap', 'valign', 'value',
71
- 'vspace', 'width', 'itemprop']
52
+ 'a' => ['href'],
53
+ 'img' => ['src', 'longdesc'],
54
+ 'div' => ['itemscope', 'itemtype'],
55
+ 'blockquote' => ['cite'],
56
+ 'del' => ['cite'],
57
+ 'ins' => ['cite'],
58
+ 'q' => ['cite'],
59
+ :all => ['abbr', 'accept', 'accept-charset',
60
+ 'accesskey', 'action', 'align', 'alt', 'axis',
61
+ 'border', 'cellpadding', 'cellspacing', 'char',
62
+ 'charoff', 'charset', 'checked',
63
+ 'clear', 'cols', 'colspan', 'color',
64
+ 'compact', 'coords', 'datetime', 'dir',
65
+ 'disabled', 'enctype', 'for', 'frame',
66
+ 'headers', 'height', 'hreflang',
67
+ 'hspace', 'ismap', 'label', 'lang',
68
+ 'maxlength', 'media', 'method',
69
+ 'multiple', 'name', 'nohref', 'noshade',
70
+ 'nowrap', 'open', 'prompt', 'readonly', 'rel', 'rev',
71
+ 'rows', 'rowspan', 'rules', 'scope',
72
+ 'selected', 'shape', 'size', 'span',
73
+ 'start', 'summary', 'tabindex', 'target',
74
+ 'title', 'type', 'usemap', 'valign', 'value',
75
+ 'vspace', 'width', 'itemprop']
72
76
  },
73
77
  :protocols => {
74
- 'a' => {'href' => ANCHOR_SCHEMES},
75
- 'img' => {
78
+ 'a' => {'href' => ANCHOR_SCHEMES},
79
+ 'blockquote' => {'cite' => ['http', 'https', :relative]},
80
+ 'del' => {'cite' => ['http', 'https', :relative]},
81
+ 'ins' => {'cite' => ['http', 'https', :relative]},
82
+ 'q' => {'cite' => ['http', 'https', :relative]},
83
+ 'img' => {
76
84
  'src' => ['http', 'https', :relative],
77
85
  'longdesc' => ['http', 'https', :relative]
78
86
  }
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Pipeline
3
- VERSION = "2.1.0"
3
+ VERSION = "2.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Tomayko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-22 00:00:00.000000000 Z
12
+ date: 2015-09-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri