File tree Expand file tree Collapse file tree
controllers/workarea/admin
view_models/workarea/admin
core/app/models/workarea/tax Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,11 @@ def show
2727 search = Search ::RelatedHelp . new ( ids : [ @help_article . id ] )
2828 @related = Admin ::HelpSearchViewModel . new ( search , view_model_options )
2929 @article_body = Redcarpet ::Markdown . new (
30- Redcarpet ::Render ::HTML . new ( hard_wrap : true )
30+ Redcarpet ::Render ::HTML . new (
31+ hard_wrap : true ,
32+ filter_html : true ,
33+ safe_links_only : true
34+ )
3135 ) . render ( @help_article . body . to_s )
3236 end
3337
Original file line number Diff line number Diff line change @@ -60,12 +60,13 @@ def scoped_entries
6060 end
6161
6262 if options [ :id ] . present?
63- Array ( options [ :id ] ) . each do |id |
64- criteria = criteria . any_of (
63+ clauses = Array ( options [ :id ] ) . flat_map do |id |
64+ [
6565 { audited_id : id } ,
6666 { 'document_path.id' => convert_to_object_id ( id ) }
67- )
67+ ]
6868 end
69+ criteria = criteria . any_of ( *clauses ) unless clauses . empty?
6970 end
7071
7172 if options [ :created_at_greater_than ] . present?
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def self.search(query)
4343 clauses = [ { region : regex } , { postal_code : regex } ]
4444 clauses << { country : country } if country . present?
4545
46- any_of ( clauses )
46+ any_of ( * clauses )
4747 end
4848
4949 def self . sorts
You can’t perform that action at this time.
0 commit comments