summaryrefslogtreecommitdiff
path: root/inc/html.php
diff options
context:
space:
mode:
authorTim Roes <mail@timroes.de>2012-05-07 17:08:35 +0200
committerTim Roes <mail@timroes.de>2012-05-07 17:08:35 +0200
commitefa78c8638547cab77a37006e7f86aed792a1609 (patch)
tree492804d80b28f8e32785b3648d9e03e77804b50f /inc/html.php
parentae992f53831c105d6deacfef79d7723b22a00033 (diff)
parentf774b92a94947b3eabd64919b6b4ba74f9c4b5fd (diff)
downloadrpg-efa78c8638547cab77a37006e7f86aed792a1609.tar.gz
rpg-efa78c8638547cab77a37006e7f86aed792a1609.tar.bz2
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Diffstat (limited to 'inc/html.php')
-rw-r--r--inc/html.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/html.php b/inc/html.php
index 022cd792a..be5666353 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -280,8 +280,11 @@ function html_draft(){
* @author Harry Fuecks <hfuecks@gmail.com>
*/
function html_hilight($html,$phrases){
- $phrases = array_filter((array) $phrases);
- $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases)));
+ $phrases = (array) $phrases;
+ $phrases = array_map('preg_quote_cb', $phrases);
+ $phrases = array_map('ft_snippet_re_preprocess', $phrases);
+ $phrases = array_filter($phrases);
+ $regex = join('|',$phrases);
if ($regex === '') return $html;
if (!utf8_check($regex)) return $html;