[pmwiki-devel] Wiki links with title/alt text attribute

Petko Yotov 5ko at 5ko.fr
Tue May 3 04:46:58 CDT 2011


On Tuesday 03 May 2011 11:20:27, John Rankin wrote :
> > In fact, the MakePageName function contains the line
> > 
> >   $str = preg_replace('/[#?].*$/', '', $str);
> > 
> > so I think the line in trails.php that does
> > 
> >   preg_replace('/[#?].+/', '', $match[3])
> > 
> > is redundant and can be removed.

Yes indeed, it looks like it can be removed for the next version.


> Changing trails.php line 74
...
> fixed the problem. MakePageName removes any anchors
> and the book is now coming out as expected.

Do you also use a custom MakePageName function? Because in the original one, 
the # character and what follows it is removed at the very beginning, before 
replacing $MakePageNamePatterns, and the result should be the same as it is 
now with anchors removed in ReadTrail().

Petko



More information about the pmwiki-devel mailing list