summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-05-26 09:30:13 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-05-26 09:30:13 +0200
commit808551e3748c0e77925d74031f348cdb2c07b7c1 (patch)
tree65e8142bb60af3e474ca4fc43a63ed367aa92c3f
parentf4b5c371aae85211aeba0a37ade15e0e4f01e785 (diff)
downloadrpg-808551e3748c0e77925d74031f348cdb2c07b7c1.tar.gz
rpg-808551e3748c0e77925d74031f348cdb2c07b7c1.tar.bz2
don't pass function return as reference in html_hilight()
Ignore-this: 19a8e8cbdbafea2268a31a08a65f4e05 This was actually reported [1] as a bug elsewhere, but really should be fixed in DokuWiki and now is. [1] https://www.projectzero.org/bugzilla/show_bug.cgi?id†71 darcs-hash:20090526073013-7ad00-90c0bee83ebc6c9c3e33b2a58b8d0a17d828f748.gz
-rw-r--r--inc/html.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index b1e755cd3..86c926cf5 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -265,7 +265,8 @@ function html_draft(){
* @author Harry Fuecks <hfuecks@gmail.com>
*/
function html_hilight($html,$phrases){
- $regex = join('|',array_map('preg_quote_cb',array_filter((array) $phrases)));
+ $phrases = array_filter((array) $phrases);
+ $regex = join('|',array_map('preg_quote_cb',$phrases));
if ($regex === '') return $html;
$html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html);