diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-03-10 22:49:39 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-03-10 22:49:39 +0100 |
commit | 546d3a9994d9f365f75e55f2f22601dc4941f5d5 (patch) | |
tree | a01027133c05b3e2fb39b081c814613a35909397 /inc/parser | |
parent | 68c26e6d2ab4feaf957863bcf5ba379036c014d3 (diff) | |
download | rpg-546d3a9994d9f365f75e55f2f22601dc4941f5d5.tar.gz rpg-546d3a9994d9f365f75e55f2f22601dc4941f5d5.tar.bz2 |
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
Diffstat (limited to 'inc/parser')
-rw-r--r-- | inc/parser/xhtml.php | 9 |
1 files changed, 7 insertions, 2 deletions
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 |