[dokuwiki] Re: patch: pass down $QUERY to searchpage.txt

  • From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 27 Jan 2011 15:32:51 +0100

> I'm sure there is some escaping that might be necessary - but it seems to work
> for me...

Yeah, since the replacement is done after the wiki parsing (which is
needed to avoid needing to disable the cache ) and done on HTML level,
you need to escape the ouput.

> -    print p_locale_xhtml('searchpage');
> +    $search = p_locale_xhtml('searchpage');
> +    $search = str_replace('@SEARCH@', $QUERY ,$ID),$search);

This str_replace is probably not what you intended ;-)

I applied your suggestion at
https://github.com/splitbrain/dokuwiki/commit/06756ad2b150ae2ce564043d0e7f02de5fa22b59

Andi

-- 
splitbrain.org
--
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: