sanitize_with_deprecated 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d140c298afe697ec3dcefd930aba204b49580a73
4
+ data.tar.gz: 8f46f798a0773e1747701ce71cba8f6325e4557b
5
+ SHA512:
6
+ metadata.gz: b47815f71c3541a3110d5b3b622005e52b6e4011d9344154ba400a011feeef61117d43fcd88485f25f780b013c3cfe9eecc992ba241f90a28450012006b67598
7
+ data.tar.gz: 65803ca90cf8d74b13de6b47dd6c2e3ef5dcba88ea633729fe9b91f10115ba3e39393728943762d03ea918928c568cb5e571860525773cb0fbcc6b84062ae13c
data/LICENSE ADDED
@@ -0,0 +1,18 @@
1
+ Copyright (c) 2017 Stephen O’Brien <stepheno@gmail.com>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the 'Software'), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+ the Software, and to permit persons to whom the Software is furnished to do so,
8
+ subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Sanitize with Deprecated
2
+
3
+ This is an extension to [Sanitize](https://github.com/rgrove/sanitize). Even in
4
+ its most permissive built-in configuration, Sanitize will still strip deprecated
5
+ HTML elements like `<center>` and `<font>`.
6
+
7
+ However, such elements remain commonly used, in contexts like email templates.
8
+
9
+ This gem introduces an additional config,
10
+ `Sanitize::Config::RELAXED_WITH_DEPRECATED`, which will not strip a custom list
11
+ of still-commonly-used deprecated elements.
12
+
13
+ ## Installation
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ gem 'sanitize_with_deprecated'
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install sanitize_with_deprecated
26
+
27
+ ## Usage
28
+
29
+ Use the exposed `Sanitize::Config::RELAXED_WITH_DEPRECATED` configuration
30
+ constant as described in
31
+ [sanitize’s documentation](https://github.com/rgrove/sanitize#quick-start).
@@ -0,0 +1,3 @@
1
+ module SanitizeWithDeprecated
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,8 @@
1
+ require "sanitize"
2
+
3
+ Sanitize::Config::RELAXED_WITH_DEPRECATED = Sanitize::Config.merge(
4
+ Sanitize::Config::RELAXED,
5
+ elements: Sanitize::Config::RELAXED[:elements] + %w[
6
+ acronym basefont big blink center command dir font marquee strike tt
7
+ ]
8
+ )
metadata ADDED
@@ -0,0 +1,91 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sanitize_with_deprecated
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Stephen O’Brien
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sanitize
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: A relaxed configuration for Sanitize supporting deprecated, but still
56
+ commonly-used, HTML tags
57
+ email:
58
+ - stepheno@gmail.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - LICENSE
64
+ - README.md
65
+ - lib/sanitize_with_deprecated.rb
66
+ - lib/sanitize_with_deprecated/version.rb
67
+ homepage: https://github.com/steobrien/sanitize_with_deprecated
68
+ licenses:
69
+ - MIT
70
+ metadata: {}
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubyforge_project:
87
+ rubygems_version: 2.6.11
88
+ signing_key:
89
+ specification_version: 4
90
+ summary: Relaxed Sanitize config supporting deprecated tags
91
+ test_files: []