[Pmwiki-users] Bug in [[include:...]] markup translation

Jonathan Scott Duff duff
Wed Jul 30 21:51:50 CDT 2003


On Thu, Jul 31, 2003 at 03:12:29PM +1200, John Rankin wrote:
> If I write:
> 
>   Here is $123 million.
> 
> on SomePage. Then on another page write:
> 
>   [[include:SomePage]]
> 
> it comes out as
> 
>   Here is 3 million.
> 
> It appears to be the $ sign that is causing the problem. Writing
> 
>   Here is 123 million.
> 
> works as expected.
> 
> Try including http://www.pmichaud.com/wiki/Main/WikiSandbox and you will see what I mean.
> 
> Anyone have any ideas?

Yep.  I quickly glanced at the code and noticed that Pm is using
preg_replace() to obtain the include effect.  preg_replace() will do
$N substitutions on the replacement text where N is from 0 to 99. Thus
it replaces $12 with the twelfth (emtpy) parenthesized thing in the
pattern.

-Scott
-- 
Jonathan Scott Duff
duff at cbi.tamucc.edu



More information about the pmwiki-users mailing list