Amorphous - I noticed that Geert edited your post. Are two pieces of code exactly as they are placed?
So, although the source code was intended to be allocated, I understand that you are trying to repurpose it to generate links - it should and works fine for it (checked as sent).
NEVER escaping the first piece of code can be a problem.
$text=Text->highlight($text,$tags,'<a href="/tags/\1">\1</a>',1);
Works great ... but if you use speach characters rather than quotation marks, backslashes disappear like escape marks - you need to avoid them. If you do not get links% 01.
The correct way with signs:
$text=Text->highlight($text,$tags,"<a href=\"/tags/\\1\">\\1</a>",1);
(Note the use of \ 1 instead of \ 1)
Rudu
source share