[pmwiki-users] $ROSPatterns unusable

J. Meijer commentgg at hotmail.com
Sun Oct 8 10:02:51 CDT 2006


I was playing around with $ROSPatterns. Again. Since this hasn't been posted before and it is probably the one and only Big Pmwiki Bug I thought it was a good reminder for the next version. The bug renders ROSPatterns essentially unusable due to surprise results. 

F.e. passing $pagename to a function (a common thing to do in pmwiki) isn't possible unless using escape mechanisms designed to ilude the bug. One can f.e. write '$$ppagename' instead. The results below illustrate why this works. 

It seems to me noone is seriously using (or prevented from seriously using) $ROSPatterns (beyond simple substitutions like [[~~~~]]). 

/jm



-----------------------
To illustrate the bug post add this ROSPattern to your config.php:

$ROSPatterns['/testword/']='
$aaaa
$bbbb
$cccc
$dddd
$ffff
$gggg
$hhhh
$iiii
$jjjj
$kkkk
$llll
$mmmm
$nnnn
$oooo
$pppp
$qqqq
$rrrr
$ssss
$tttt
$uuuu
$vvvv
$wwww
$xxxx
$yyyy
$zzzz';

When typing 'testword' as the pagetext, this results:

$aaaa
$bbbb
centerccc
$dddd
local/localmap.txtfff
$gggg
$hhhh
$iiii
$jjjj
ALPHAkkk
$llll
$mmmm
$nnnn
$oooo
ppp
n=Main.Main&action=editqqq
$rrrr
$ssss
imagettt
$uuuu
vvv
$wwww
$xxxx
$yyyy
$zzzz

Note that $<uppercase> generally works fine. 
_________________________________________________________________
Share your special moments by uploading 500 photos per month to Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0100000001msn/direct/01/?href=http://spaces.live.com/signup.aspx 



More information about the pmwiki-users mailing list