[pmwiki-users] QuickReplace recipe

Jan Hegewald hegewald at cab.bau.tu-bs.de
Tue Dec 11 01:38:19 CST 2007


Am 08.12.2007 um 02:43 schrieb Stirling Westrup:

> Jan Hegewald wrote:
>> Hello all,
>> I use the QuickReplace recipe (by Stirling Westrup) everywhere in my
>> pmwiki. Unfortunately it seems to also substitute text in URLs:
>> http://java.sun.com/docs/hotspot/HotSpotFAQ.html
>> will become
>> http://java.sun.com/docs/hotspot/HotSpot%9D%9D47%9D%9D.html
>> Is there some way to tell QuickReplace not to modify URLs at all?
>>
> QuickReplace is intended to work by having some markup around all
> replacements, and only those get replaced. It looks like you've set it
> up so that all occurrences of 'FAQ' are being replaced with something.
> Is this right?

Yes:

$QuickReplace['Acronyms'] = array
   ( 'flags' => 'e'
   , 'page'  => array
       ( '{$SiteGroup}.Acronyms'
       , '{$Group}.Acronyms'
       , '{$FullName}-Acronyms'
       , 'Misc.Acronyms' # use Misc.Acronyms as acronyms for every page
       )
#  , 'match' => '{$1}' # acronym must be surrounded by {}, e.g. {FAQ}
   , 'match' => '$1'
   , 'output' => 'Keep(PSS("<abbr title=\"$2\">$1</abbr>"))'
   );

Can I avoid to replace in URLs?


Many TIA,
-- Jan



More information about the pmwiki-users mailing list