From fdb4e9724368ccbc3a929f2c8c4d7bb16d770beb Mon Sep 17 00:00:00 2001 From: Elijah Hamovitz Date: Wed, 23 Feb 2022 15:12:09 -0800 Subject: [PATCH 1/2] Update `haml` gem to 5.2.0 Switching us back to the mainline gem, from our custom fork. --- Gemfile | 5 +---- Gemfile.lock | 36 +++++++++++++++--------------------- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index c068e23cbc48..354cd2193c24 100644 --- a/Gemfile +++ b/Gemfile @@ -174,10 +174,7 @@ gem 'omniauth-rails_csrf_protection', '~> 0.1' gem 'bootstrap-sass', '~> 2.3.2.2' -# Ref: https://github.com/haml/haml/issues/940 -# https://github.com/haml/haml/issues/982 -# https://github.com/haml/haml/issues/985 -gem 'haml', github: 'wjordan/haml', ref: 'cdo' +gem 'haml', '~> 5.2.0' gem 'jquery-ui-rails', '~> 6.0.1' diff --git a/Gemfile.lock b/Gemfile.lock index 34fe82e1d46c..7e8f232a7194 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -81,15 +81,6 @@ GIT specs: gnista (1.0.1) -GIT - remote: https://github.com/wjordan/haml.git - revision: 22739a012fb34765d9d4b733f997862547a2b9cf - ref: cdo - specs: - haml (5.0.4) - temple (>= 0.8.0) - tilt - GIT remote: https://github.com/wjordan/image_optim.git revision: 939996f7ad102227c73b42bfda0058f9c66698aa @@ -463,16 +454,19 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.12) - haml-rails (1.0.0) - actionpack (>= 4.0.1) - activesupport (>= 4.0.1) + haml (5.2.2) + temple (>= 0.8.0) + tilt + haml-rails (2.0.1) + actionpack (>= 5.1) + activesupport (>= 5.1) haml (>= 4.0.6, < 6.0) html2haml (>= 1.0.1) - railties (>= 4.0.1) - haml_lint (0.27.0) - haml (>= 4.0, < 5.1) + railties (>= 5.1) + haml_lint (0.37.1) + haml (>= 4.0, < 5.3) + parallel (~> 1.10) rainbow - rake (>= 10, < 13) rubocop (>= 0.50.0) sysexits (~> 1.1) hammerspace (0.1.7) @@ -762,8 +756,8 @@ GEM ruby-progressbar (1.10.1) ruby-rc4 (0.1.5) ruby_dep (1.3.1) - ruby_parser (3.11.0) - sexp_processor (~> 4.9) + ruby_parser (3.18.1) + sexp_processor (~> 4.16) rubyzip (1.2.2) safe_yaml (1.0.4) sass (3.4.22) @@ -792,7 +786,7 @@ GEM childprocess (~> 0.5) rubyzip (~> 1.2, >= 1.2.2) sequel (5.9.0) - sexp_processor (4.10.1) + sexp_processor (4.16.0) shotgun (0.9.1) rack (>= 1.0) signet (0.12.0) @@ -831,7 +825,7 @@ GEM i18n json (>= 1.4.3) sysexits (1.2.0) - temple (0.8.0) + temple (0.8.2) thin (1.7.2) daemons (~> 1.0, >= 1.0.9) eventmachine (~> 1.0, >= 1.0.4) @@ -959,7 +953,7 @@ DEPENDENCIES gnista! google-api-client (~> 0.23) google_drive - haml! + haml (~> 5.2.0) haml-rails haml_lint hammerspace From 8bf5fe589945e908fcbfd13f8f3e335f901c7c2a Mon Sep 17 00:00:00 2001 From: Elijah Hamovitz Date: Thu, 24 Feb 2022 13:31:33 -0800 Subject: [PATCH 2/2] update option name Will's original implementation gave this option the name `escape_interpolated_html`, but it was changed to `escape_filter_interpolations` in the review process --- dashboard/config/initializers/haml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/config/initializers/haml.rb b/dashboard/config/initializers/haml.rb index ae9d633781c4..72b7bc554a3b 100644 --- a/dashboard/config/initializers/haml.rb +++ b/dashboard/config/initializers/haml.rb @@ -1,3 +1,3 @@ # Disable escaping HTML in interpolated strings, for backwards compatibility with Haml < 5 behavior. # See: https://github.com/haml/haml/pull/984 -Haml::Template.options[:escape_interpolated_html] = false +Haml::Template.options[:escape_filter_interpolations] = false