I am working on integrating the TextExtract recipe with
action=search and the standard PmWiki pagelist functions.

I found two problematic things in FmtPageList(), and wonder
how to solve them:

1. At the beginnig of FmtPageList() are some code lines which
check if input from a search query starts with 'someword/'
and assign group=someword and remove 'someword/' as query argument.
This is fine for the standard PmWiki search box which has only the
one text input field. But other search forms can be built, with
(:input:) markup, or hardcoded in scripts, which can have a separate
filed for group and/or pagename input. TextExtract is using such
a form. So now I am missing for a mechanism which can disable the
standard behaviour of treating 'word/' as group=word.
It is a lot of trouble trying to undo later what FmtPageList() does
to such input. A global config variable would be handy to turn off
 'word/' => group=word

2. FmtPageList() applies
   htmlspecialchars(stripmagic(@$_REQUEST['q']), ENT_NOQUOTES);
to the search query. All other input is missing out on stripmagic()
treatment. This does not work well if a server has magic quotes
enabled. Would it be feasable to apply stripmagic to all $_REQUEST
input? And htmlspecialchars()? What is the preferred way for recipes
to deal with this, or for users bulding some custom search forms
with custom input fields?

thanks,
Hans


_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to