X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/523650d9c2b876152aaa9bc6c5d6363377ea7008..e78a8c2834e7ad880ab45d26db3a952df8465493:/IkiWiki/Plugin/smiley.pm diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 1697a37c1..0d77916d0 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -87,10 +87,10 @@ MATCH: while (m{(?:^|(?<=\s|>))(\\?)$smiley_regexp(?:(?=\s|<)|$)}g) { } else { # Replace the smiley with its expanded value. - substr($_, $spos, length($smiley))= - htmllink($params{page}, $params{destpage}, + my $link=htmllink($params{page}, $params{destpage}, $smileys{$smiley}, linktext => $smiley); - pos=$epos+1; + substr($_, $spos, length($smiley))=$link; + pos=$epos+length($link); } }