summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/smiley.pm6
-rw-r--r--debian/changelog1
2 files changed, 4 insertions, 3 deletions
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);
}
}
diff --git a/debian/changelog b/debian/changelog
index d6ee6fd8a..e5d522200 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ ikiwiki (3.07) UNRELEASED; urgency=low
* Updated French translation (Jean-Luc Coulon). Closes: #518510
* wmd: New plugin contributed by William Uther to support the WMD
Wysiwym markdown editor.
+ * smiley: Avoid infinite loop in smiley expansion. Closes: #518805
-- Joey Hess <joeyh@debian.org> Thu, 05 Mar 2009 15:43:02 -0500