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 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