html-pipeline 3.1.0 → 3.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fabe2eaefdce46521fffa5ddbbe5fc1d77a763a48ad4beab286ff77cabd2bbd4
|
4
|
+
data.tar.gz: faf1d2aea3de3f6ee47e309cf7bd6fe631aa027c164525fd2eee7b8b038e845b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e3b4445465f84909c991cfbbbcadc268c95e2ff0936748eb4257f046201a4a3abe65f9117cfba9679246adc2292e7a379d5eb9fad50dfb40fc3534ea330c21
|
7
|
+
data.tar.gz: 97d015f909923900889e2fea5ee077f56ddd8166089c98f1860280c52be5ba01a363c87f404a15d6fbb6519b04aa1f2d6d9281dfc07c9ab36ceb43c851672ef9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [v3.1.0] - 28-02-2024
|
2
|
+
## What's Changed
|
3
|
+
* UPGRADING: not removed by @dentarg in https://github.com/gjtorikian/html-pipeline/pull/397
|
4
|
+
* [BREAKING] now requires instantiation by @gjtorikian in https://github.com/gjtorikian/html-pipeline/pull/398
|
5
|
+
|
6
|
+
## New Contributors
|
7
|
+
* @dentarg made their first contribution in https://github.com/gjtorikian/html-pipeline/pull/397
|
8
|
+
|
9
|
+
**Full Changelog**: https://github.com/gjtorikian/html-pipeline/compare/v3.0.3...v3.1.0
|
1
10
|
## [v3.0.3] - 02-02-2024
|
2
11
|
|
3
12
|
## What's Changed
|
data/README.md
CHANGED
@@ -375,7 +375,7 @@ you to add additional elements. You can either modify the constant's value, or
|
|
375
375
|
re-define your own config and pass that in, such as:
|
376
376
|
|
377
377
|
```ruby
|
378
|
-
config = HTMLPipeline::SanitizationFilter::DEFAULT_CONFIG.
|
378
|
+
config = HTMLPipeline::SanitizationFilter::DEFAULT_CONFIG.deep_dup
|
379
379
|
config[:elements] << "iframe" # sure, whatever you want
|
380
380
|
```
|
381
381
|
|
@@ -9,7 +9,7 @@ class HTMLPipeline
|
|
9
9
|
# <img src="http://example.com/test.jpg" alt=""/>.
|
10
10
|
|
11
11
|
class ImageFilter < TextFilter
|
12
|
-
def call(text)
|
12
|
+
def call(text, context: {}, result: {})
|
13
13
|
text.gsub(%r{(https|http)?://.+\.(jpg|jpeg|bmp|gif|png)(\?\S+)?}i) do |match|
|
14
14
|
%(<img src="#{match}" alt=""/>)
|
15
15
|
end
|
@@ -5,7 +5,7 @@ class HTMLPipeline
|
|
5
5
|
# Simple filter for plain text input. HTML escapes the text input and wraps it
|
6
6
|
# in a div.
|
7
7
|
class PlainTextInputFilter < TextFilter
|
8
|
-
def call(text)
|
8
|
+
def call(text, context: {}, result: {})
|
9
9
|
"<div>#{CGI.escapeHTML(text)}</div>"
|
10
10
|
end
|
11
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-pipeline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen J. Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selma
|