From 568ab8341ba9c7b59a8768296801944967cdc1cf Mon Sep 17 00:00:00 2001 From: "Kit (OpenClaw)" Date: Tue, 17 Mar 2026 12:44:03 -0400 Subject: [PATCH 1/2] Fix admin help markdown sanitization regression --- admin/app/controllers/workarea/admin/help_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/app/controllers/workarea/admin/help_controller.rb b/admin/app/controllers/workarea/admin/help_controller.rb index 5cd3ea6af..a154f32e8 100644 --- a/admin/app/controllers/workarea/admin/help_controller.rb +++ b/admin/app/controllers/workarea/admin/help_controller.rb @@ -27,7 +27,11 @@ def show search = Search::RelatedHelp.new(ids: [@help_article.id]) @related = Admin::HelpSearchViewModel.new(search, view_model_options) @article_body = Redcarpet::Markdown.new( - Redcarpet::Render::HTML.new(hard_wrap: true) + Redcarpet::Render::HTML.new( + hard_wrap: true, + filter_html: true, + safe_links_only: true + ) ).render(@help_article.body.to_s) end From 97a3852d7d607784633e4eeb207c8d3229e1d817 Mon Sep 17 00:00:00 2001 From: "Kit (OpenClaw)" Date: Tue, 17 Mar 2026 14:44:20 -0400 Subject: [PATCH 2/2] fix: apply Mongoid 8 any_of fixes to activity_view_model and tax/rate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - admin/activity_view_model.rb: collect any_of clauses into array and call any_of(*clauses) once outside the loop; avoids AND-of-ORs in Mongoid 8 when multiple IDs are provided (WA-VERIFY-091) - core/tax/rate.rb: splat clauses array in any_of call to match Mongoid 8 variadic signature (WA-VERIFY-091) Note: branch also includes WA-VERIFY-089 count→size changes from prior commit. --- .../app/view_models/workarea/admin/activity_view_model.rb | 7 ++++--- core/app/models/workarea/tax/rate.rb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/admin/app/view_models/workarea/admin/activity_view_model.rb b/admin/app/view_models/workarea/admin/activity_view_model.rb index bd20a9c07..a3b6d60ff 100644 --- a/admin/app/view_models/workarea/admin/activity_view_model.rb +++ b/admin/app/view_models/workarea/admin/activity_view_model.rb @@ -60,12 +60,13 @@ def scoped_entries end if options[:id].present? - Array(options[:id]).each do |id| - criteria = criteria.any_of( + clauses = Array(options[:id]).flat_map do |id| + [ { audited_id: id }, { 'document_path.id' => convert_to_object_id(id) } - ) + ] end + criteria = criteria.any_of(*clauses) unless clauses.empty? end if options[:created_at_greater_than].present? diff --git a/core/app/models/workarea/tax/rate.rb b/core/app/models/workarea/tax/rate.rb index 784c05a04..6f247b6cc 100644 --- a/core/app/models/workarea/tax/rate.rb +++ b/core/app/models/workarea/tax/rate.rb @@ -43,7 +43,7 @@ def self.search(query) clauses = [{ region: regex }, { postal_code: regex }] clauses << { country: country } if country.present? - any_of(clauses) + any_of(*clauses) end def self.sorts