diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c291f140a..6be97a889 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,7 +3,7 @@ - Fixed a bug in the Collaboration System where posts from the Safari browser would be submitted without changes. - fix: New pagination breaks SQL Reports with semicolons - + - Wiki autolinks prefer longest title match 7.4.0 - api: Form Controls and Workflow Activities may now include web based helper diff --git a/lib/WebGUI/Asset/Wobject/WikiMaster.pm b/lib/WebGUI/Asset/Wobject/WikiMaster.pm index ec1064ca7..914651b4d 100644 --- a/lib/WebGUI/Asset/Wobject/WikiMaster.pm +++ b/lib/WebGUI/Asset/Wobject/WikiMaster.pm @@ -98,7 +98,7 @@ sub autolinkHtml { $key =~ s{\)}{\\\)}gxms; # escape parens $mapping{$key} = $self->session->url->gateway($mapping{$key}); } - my $matchString = join('|', map{quotemeta} keys %mapping); + my $matchString = join('|', map{quotemeta} sort {length($b) <=> length($a)} keys %mapping); my $regexp = qr/($matchString)/i; my @acc = (); my $in_a = 0;