dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79f8a9e
)
Escape delimiter in SpecialPage::prefixSearchArray
author
Chad Horohoe
<chadh@wikimedia.org>
Thu, 26 Jun 2014 19:45:40 +0000
(12:45 -0700)
committer
Parent5446
<tylerromeo@gmail.com>
Thu, 26 Jun 2014 19:50:57 +0000
(19:50 +0000)
Changed preg_quote() call so that the proper delimiter
is passed as the second parameter, thus making sure
it is properly escaped.
Change-Id: Ie12418e5433642b86dcda425b63a05ac3ff2c29d
includes/specialpage/SpecialPage.php
patch
|
blob
|
history
diff --git
a/includes/specialpage/SpecialPage.php
b/includes/specialpage/SpecialPage.php
index
302e408
..
f968276
100644
(file)
--- a/
includes/specialpage/SpecialPage.php
+++ b/
includes/specialpage/SpecialPage.php
@@
-346,7
+346,7
@@
class SpecialPage {
* @return string[]
*/
protected static function prefixSearchArray( $search, $limit, array $subpages ) {
- $escaped = preg_quote( $search );
+ $escaped = preg_quote( $search
, '/'
);
return array_slice( preg_grep( "/^$escaped/i", $subpages ), 0, $limit );
}