Patch (to be ported)
Project:
TWikifilter
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
23 Mar 2009 at 10:54 UTC
Updated:
30 Mar 2009 at 20:03 UTC
Hi,
The wiki links with spaces ([[http://url/][link text with spaces]]) don't seem to translate correctly (didn't translate at all, actually). I hunted it down to this line in twikifilter.module:
$mod = preg_replace("/\[\[$commonurls\]\[(\S+)\]\]/","<a href=\"$1\" title=\"$2\">$2</a>",$mod);
By modifying it to this made it work:
$mod = preg_replace("/\[\[$commonurls\]\[([\S ]+?)\]\]/","<a href=\"$1\" title=\"$2\">$2</a>",$mod);
Important to have the lazy plus [\S ]+? in there, otherwise it won't work if there are subsequent links. Probably should change all the other regex's handling the [[][]] -links too.
Note: I didn't check any of the TWiki documentation or code for this.
Comments
Comment #1
mradcliffeThanks, I'm going to test a few things.