[pmwiki-devel] strange conversions: a FmtPageName bug

Hans design5 at softflow.co.uk
Sat Mar 8 18:36:09 CST 2008


Saturday, March 8, 2008, 11:58:35 PM, Hans wrote:

> A less aggressive and more precise replacement can be done instead
> with:

>   foreach($g as $k=>$v)
>         $fmt = preg_replace("/$k/",$v $fmt);

that does not do it. Perhaps this, which asks for a word boundary:

  foreach($g as $k => $v)
          $fmt = preg_replace( "/\\$k\\b/", $v, $fmt);




Hans




More information about the pmwiki-devel mailing list