From 00503f25cdd892de521983a29f7e3d96a32801c8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 28 Jun 2008 16:58:31 -0400 Subject: [PATCH] smiley: Generate links relative to the destpage. (Fixes a reversion from 2.41.) --- IkiWiki/Plugin/smiley.pm | 2 +- debian/changelog | 2 ++ .../Problem_with_displaying_smileys_on_inline_page.mdwn | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index a8fed69e1..51b32b28f 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -76,7 +76,7 @@ MATCH: while (m{(?:^|(?<=\s|>))(\\?)$smiley_regexp(?:(?=\s|<)|$)}g) { else { # Replace the smiley with its expanded value. substr($_, $spos, length($smiley))= - htmllink($params{page}, $params{page}, + htmllink($params{page}, $params{destpage}, $smileys{$smiley}, linktext => $smiley); } } diff --git a/debian/changelog b/debian/changelog index d92d5fa1a..0492ff87c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ ikiwiki (2.51) UNRELEASED; urgency=low * Add support for the universal edit button (To get this on all pages of an exiting wiki, rebuild the wiki.) * txt: New plugin, contributed by Gabriel McManus. + * smiley: Generate links relative to the destpage. (Fixes a reversion from + 2.41.) -- Joey Hess Sun, 15 Jun 2008 15:03:33 -0400 diff --git a/doc/bugs/Problem_with_displaying_smileys_on_inline_page.mdwn b/doc/bugs/Problem_with_displaying_smileys_on_inline_page.mdwn index c50d01c44..c0ee40715 100644 --- a/doc/bugs/Problem_with_displaying_smileys_on_inline_page.mdwn +++ b/doc/bugs/Problem_with_displaying_smileys_on_inline_page.mdwn @@ -12,3 +12,9 @@ What about if I have main inline page, for example Do you have any idea how to fix it? I dont't want to have multiple `smileys` directory, of course :) --[[Paweł|ptecza]] + +> I see that I broke this in commit +> 0b9e849aba38f0695491ad5ca27de11632627ffe, presumably because a) sanitize +> filters didn't get destpage at the time and b) I didn't think through +> what that meant. Luckily, in the meantime, I added destpage to santize's +> parameters, so it was easy to fix. [[done]] --[[Joey]] -- 2.39.2