Index: branches/release-41/lib/MT/App/Search.pm
===================================================================
--- branches/release-41/lib/MT/App/Search.pm (revision 2511)
+++ branches/release-41/lib/MT/App/Search.pm (revision 2738)
@@ -486,5 +486,5 @@
     }
     if ( my $template = $q->param('Template') ) {
-        $template =~ s/[\w\-\.]//g;
+        $template =~ s/[^\w\-\.]//g;
         $ctx->stash('template_id', $template);
     }
