From 546d3a9994d9f365f75e55f2f22601dc4941f5d5 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Mon, 10 Mar 2008 22:49:39 +0100 Subject: another change in highlight handling Now higlighting phrases are passed as an array which then is quoted correctly when used in a regexp. This should make phrase highlighting work completely correct. Please everyone test it. darcs-hash:20080310214939-7ad00-1abefb02dde40edeead50b4fa5c866c46b95ca3a.gz --- inc/parser/xhtml.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php index 8add04363..b45e310ca 100644 --- a/inc/parser/xhtml.php +++ b/inc/parser/xhtml.php @@ -517,8 +517,13 @@ class Doku_Renderer_xhtml extends Doku_Renderer { $link['title'] = $id; //add search string if($search){ - ($conf['userewrite']) ? $link['url'].='?s=' : $link['url'].='&s='; - $link['url'] .= rawurlencode($search); + ($conf['userewrite']) ? $link['url'].='?' : $link['url'].='&'; + if(is_array($search)){ + $search = array_map('rawurlencode',$search); + $link['url'] .= 's[]='.join('&s[]=',$search); + }else{ + $link['url'] .= 's='.rawurlencode($search); + } } //keep hash -- cgit v1.2.3