Skip to content

Commit cd77210

Browse files
authored
Merge pull request rails#166 from rails/flavorjones-update-deps-for-html5-variation2
dep: update loofah and nokogiri to versions fully supporting HTML5
2 parents e84d28d + 7cc07bb commit cd77210

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "ruby-head", "truffleruby-head"]
33+
ruby: ["2.7", "3.0", "3.1", "3.2", "ruby-head", "truffleruby-head", "jruby-9.4", "jruby-head"]
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v3
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v3
4747
- uses: ruby/setup-ruby@v1
4848
with:
49-
ruby-version: "3.1"
49+
ruby-version: "3.2"
5050
- name: Install nokogiri with system libraries
5151
run: |
5252
sudo apt install pkg-config libxml2-dev libxslt-dev
@@ -55,17 +55,3 @@ jobs:
5555
bundle install
5656
bundle exec nokogiri -v
5757
- run: bundle exec rake
58-
59-
jruby:
60-
strategy:
61-
fail-fast: false
62-
matrix:
63-
ruby: ["jruby-9.3", "jruby-9.4", "jruby-head"]
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: actions/checkout@v3
67-
- uses: ruby/setup-ruby@v1
68-
with:
69-
ruby-version: ${{matrix.ruby}}
70-
bundler-cache: true
71-
- run: bundle exec rake

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ The following aliases are maintained for backwards compatibility:
5656

5757
All sanitizers respond to `sanitize`, and are available in variants that use either HTML4 or HTML5 parsing, under the `Rails::HTML4` and `Rails::HTML5` namespaces, respectively.
5858

59+
NOTE: The HTML5 sanitizers are not supported on JRuby. Users may programmatically check for support by calling `Rails::HTML::Sanitizer.html5_support?`.
60+
61+
5962
#### FullSanitizer
6063

6164
```ruby

rails-html-sanitizer.gemspec

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
1313
spec.homepage = "https://github.com/rails/rails-html-sanitizer"
1414
spec.license = "MIT"
1515

16-
spec.required_ruby_version = ">= 2.5.0"
16+
spec.required_ruby_version = ">= 2.7.0"
1717

1818
spec.metadata = {
1919
"bug_tracker_uri" => "https://github.com/rails/rails-html-sanitizer/issues",
@@ -26,7 +26,8 @@ Gem::Specification.new do |spec|
2626
spec.test_files = Dir["test/**/*"]
2727
spec.require_paths = ["lib"]
2828

29-
# NOTE: There's no need to update this dependency for Loofah CVEs
30-
# in minor releases when users can simply run `bundle update loofah`.
31-
spec.add_dependency "loofah", "~> 2.19", ">= 2.19.1"
29+
# NOTE: There's no need to update dependencies for CVEs in minor releases
30+
# when users can simply run `bundle update loofah`.
31+
spec.add_dependency "loofah", "~> 2.21"
32+
spec.add_dependency "nokogiri", "~> 1.14"
3233
end

0 commit comments

Comments
 (0)