projects
/
webpac2
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45c6f90
)
remove non-word characters from query
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 12 Oct 2010 12:05:34 +0000
(12:05 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 12 Oct 2010 12:05:34 +0000
(12:05 +0000)
This helps with queries which include "&", "-" or something
similar which return nothing in previous implementation
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1340
07558da8
-63fa-0310-ba24-
9fe276d99e06
vhost/webpac2.cgi
patch
|
blob
|
history
diff --git
a/vhost/webpac2.cgi
b/vhost/webpac2.cgi
index
1a678c9
..
9cf686f
100755
(executable)
--- a/
vhost/webpac2.cgi
+++ b/
vhost/webpac2.cgi
@@
-234,6
+234,9
@@
if ( my $search = param('search') ) {
$template =~ s{Q}{$v};
$whitespace = " AND " if $whitespace;
+ # don't return -* &* and other non-word characters
+ return '' if $template =~ m/^\W\*$/;
+
return
$whitespace .
$attr . '="' . $template . '"';