summaryrefslogtreecommitdiff
path: root/inc/search.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2012-10-06 10:49:22 +0200
committerAndreas Gohr <andi@splitbrain.org>2012-10-06 10:49:22 +0200
commit4bc5fe9843afbd99c79d27faa4d5c1de1aa2eb1b (patch)
tree6db315c71eade74c0c903df9714b201bb72638c5 /inc/search.php
parent93a7873eb0646b5712d75b031cd8b8b143968ba2 (diff)
parent1fe8f13dbbf0b227079aadee9d206936fbb96852 (diff)
downloadrpg-4bc5fe9843afbd99c79d27faa4d5c1de1aa2eb1b.tar.gz
rpg-4bc5fe9843afbd99c79d27faa4d5c1de1aa2eb1b.tar.bz2
Merge branch 'master' into future
* master: Always load the parser in the test environment Escape filename in regex in search_index() Changed XHTML validator icon to HTML5 (FS#2619) fixed wrong apple-touch-icon extension (FS#2627) Revert "removed html dependency from media query detection JS in new template" removed html dependency from media query detection JS in new template de-couple mobile JS from widths to actual media query equivalent (fixes FS#2623)
Diffstat (limited to 'inc/search.php')
-rw-r--r--inc/search.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/search.php b/inc/search.php
index a02b86b34..1cecfd5ec 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -119,7 +119,7 @@ function search_index(&$data,$base,$file,$type,$lvl,$opts){
'listfiles' => !$opts['nofiles'],
'sneakyacl' => $conf['sneaky_index'],
// Hacky, should rather use recmatch
- 'depth' => preg_match('#^'.$file.'(/|$)#','/'.$opts['ns']) ? 0 : -1
+ 'depth' => preg_match('#^'.preg_quote($file, '#').'(/|$)#','/'.$opts['ns']) ? 0 : -1
);
return search_universal($data, $base, $file, $type, $lvl, $opts);