From f00915c255025f919f9cf8db80bbd469aff49c84 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Oct 2018 22:31:30 +0100 Subject: [PATCH] Do not use spaces as wildcard matches (* will still work) --- blocks/ORB/Search.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blocks/ORB/Search.pm b/blocks/ORB/Search.pm index 8cfda89..20c86b8 100644 --- a/blocks/ORB/Search.pm +++ b/blocks/ORB/Search.pm @@ -23,6 +23,8 @@ use strict; use parent qw(ORB); # This class extends the ORB block class use experimental qw(smartmatch); use v5.14; + + ## @method private % _build_tag($tag) # Given a reference to a hash containing tag data, generate HTML to # represent the tag @@ -95,8 +97,6 @@ sub _build_search_results { my $term = shift; my $origonly = shift // 1; - $term =~ s/\s*/%/g; - my $recipes = $self -> {"system"} -> {"recipe"} -> find(name => $term, method => $term, ingredients => [ '%'.$term.'%' ],