From 29d387d2bacfdf10cc8712af1250e5655967f1b9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 7 Mar 2009 18:57:06 -0500 Subject: wmd stuff --- debian/changelog | 2 ++ debian/copyright | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 801dc154f..d6ee6fd8a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ ikiwiki (3.07) UNRELEASED; urgency=low * Updated German translation (Kai Wasserbäch). Closes: #518377 * Updated French translation (Jean-Luc Coulon). Closes: #518510 + * wmd: New plugin contributed by William Uther to support the WMD + Wysiwym markdown editor. -- Joey Hess Thu, 05 Mar 2009 15:43:02 -0500 diff --git a/debian/copyright b/debian/copyright index f589b4a8f..67f0ac540 100644 --- a/debian/copyright +++ b/debian/copyright @@ -122,6 +122,10 @@ Files: 404.pm Copyright: © 2009 Simon McVittie License: GPL-2+ +Files: wmd.pm +Copyright: © 2009 William Uther +License: GPL-2+ + Files: doc/logo/* Copyright: © 2006 Recai Oktaş License: GPL-2+ -- cgit v1.2.3 From d3b4c2dbd13f6721042db7a7b6843851c9037551 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Mar 2009 18:46:18 -0400 Subject: avoid potential infinite loop in smiley expansion - In 3.05, ikiwiki began expanding templates in scan mode, for annoying, expensive, but ultimatly necessary reasons of correctness. - Smiley processing has a bug: It inserts a span for the smiley, and then continues searching forward in the content for more, starting at $end_of_smiley+1. Which means it searches for smilies in the span too! And if it somehow finds one, we get an infinite loop here. - This bug can, probably, only be tickled if a htmllink to show the smiley fails, because the smiley file doesn't exist, or because ikiwiki doesn't know about it. In that case, a link will be inserted to _create_ the missing page, and that link will include the smiley inside the . - When a template is expanded in scan mode, and it contains an inline, the sanitize hook is run during scan mode, which never happened before. That causes the smiley processor to run, before ikiwiki is, necessarily, aware that all the smiley files exist (depending on scan order). So it inserts creation links for them, and triggers the bug. I've put in the simple fix of jumping forward past the inserted span, and it does fix the problem. I will need to look in a bit more detail into why an inline nested inside a template is fully expanded during the scan pass -- that really shouldn't be necessary, and it makes things much slower than they need to be. --- IkiWiki/Plugin/smiley.pm | 6 +++--- debian/changelog | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') 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 Thu, 05 Mar 2009 15:43:02 -0500 -- cgit v1.2.3 From dd2fa2efb956f8af6c98d37f8cfd280df2f97cb5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Mar 2009 18:57:47 -0400 Subject: When loading a template in scan mode, let preprocess know it only needs to scan. This makes wikis such as zack's much faster in the scan pass. In that pass, when a template contains an inline, there is no reason to process the entire inline and all its pages. I'd forgotten to pass along the flag to let preprocess() know it was in scan mode, leading to much unncessary churning. --- IkiWiki/Plugin/template.pm | 6 +++++- debian/changelog | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index b872f0962..b6097bb49 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -69,9 +69,13 @@ sub preprocess (@) { } } + # This needs to run even in scan mode, in order to process + # links and other metadata includes via the template. + my $scan=! defined wantarray; + return IkiWiki::preprocess($params{page}, $params{destpage}, IkiWiki::filter($params{page}, $params{destpage}, - $template->output)); + $template->output), $scan); } 1 diff --git a/debian/changelog b/debian/changelog index e5d522200..95d414bc7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ikiwiki (3.07) UNRELEASED; urgency=low * wmd: New plugin contributed by William Uther to support the WMD Wysiwym markdown editor. * smiley: Avoid infinite loop in smiley expansion. Closes: #518805 + * template: When loading a template in scan mode, let preprocess + know it only needs to scan. -- Joey Hess Thu, 05 Mar 2009 15:43:02 -0500 -- cgit v1.2.3 From 3520d55361f8b6f04f54fb5b41b21e37cff0da21 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 8 Mar 2009 19:05:59 -0400 Subject: releasing version 3.07 --- debian/changelog | 7 ++++--- po/es.po | 26 +++++++++++++++++--------- po/fr.po | 41 +++++++++++++++++++++++------------------ po/ikiwiki.pot | 2 +- 4 files changed, 45 insertions(+), 31 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 95d414bc7..c66db85a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,15 @@ -ikiwiki (3.07) UNRELEASED; urgency=low +ikiwiki (3.07) unstable; urgency=low * Updated German translation (Kai Wasserbäch). Closes: #518377 * 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 + * smiley: Avoid infinite loop in smiley expansion triggered + by the template scan mode change in version 3.05. Closes: #518805 * template: When loading a template in scan mode, let preprocess know it only needs to scan. - -- Joey Hess Thu, 05 Mar 2009 15:43:02 -0500 + -- Joey Hess Sun, 08 Mar 2009 19:00:46 -0400 ikiwiki (3.06) unstable; urgency=low diff --git a/po/es.po b/po/es.po index abd44ee32..0212a86be 100644 --- a/po/es.po +++ b/po/es.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-01 15:03-0500\n" +"POT-Creation-Date: 2009-03-08 19:02-0400\n" "PO-Revision-Date: 2009-03-03 10:48+0100\n" "Last-Translator: Víctor Moral \n" "Language-Team: spanish \n" @@ -27,11 +27,15 @@ msgstr "Antes es necesario identificarse." msgid "" "probable misconfiguration: sslcookie is set, but you are attepting to login " "via http, not https" -msgstr "probablemente algo está mal configurado: la característica 'sslcookie' está activa, pero está intentando registrarse en el sistema vía el protocolo 'http' y no 'https'" +msgstr "" +"probablemente algo está mal configurado: la característica 'sslcookie' está " +"activa, pero está intentando registrarse en el sistema vía el protocolo " +"'http' y no 'https'" #: ../IkiWiki/CGI.pm:149 msgid "login failed, perhaps you need to turn on cookies?" -msgstr "registro fallido, ¿ tal vez necesita activar las cookies en el navegador ?" +msgstr "" +"registro fallido, ¿ tal vez necesita activar las cookies en el navegador ?" #: ../IkiWiki/CGI.pm:168 ../IkiWiki/CGI.pm:299 msgid "Your login session has expired." @@ -67,7 +71,8 @@ msgstr "Contenido añadido activado vía web." #: ../IkiWiki/Plugin/aggregate.pm:93 msgid "Nothing to do right now, all feeds are up-to-date!" -msgstr "¡ No hay nada que hacer, todas las fuentes de noticias están actualizadas !" +msgstr "" +"¡ No hay nada que hacer, todas las fuentes de noticias están actualizadas !" #: ../IkiWiki/Plugin/aggregate.pm:220 #, perl-format @@ -356,7 +361,8 @@ msgstr "" #: ../IkiWiki/Plugin/google.pm:31 msgid "Failed to parse url, cannot determine domain name" -msgstr "Error en el análisis del URL, no puedo determinar el nombre del dominio" +msgstr "" +"Error en el análisis del URL, no puedo determinar el nombre del dominio" #: ../IkiWiki/Plugin/goto.pm:49 msgid "missing page" @@ -447,7 +453,8 @@ msgstr "La página %s está bloqueada y no puede modificarse" #: ../IkiWiki/Plugin/mdwn.pm:44 msgid "multimarkdown is enabled, but Text::MultiMarkdown is not installed" -msgstr "el modo multimarkdown está activo, pero no está instalado Text::MultiMarkdown" +msgstr "" +"el modo multimarkdown está activo, pero no está instalado Text::MultiMarkdown" #: ../IkiWiki/Plugin/mdwn.pm:67 #, perl-format @@ -869,7 +876,8 @@ msgid "plugins" msgstr "complementos" #: ../IkiWiki/Plugin/websetup.pm:395 -msgid "The configuration changes shown below require a wiki rebuild to take effect." +msgid "" +"The configuration changes shown below require a wiki rebuild to take effect." msgstr "" "Los cambios en la configuración que se muestran más abajo precisan una " "reconstrucción del wiki para tener efecto." @@ -985,7 +993,8 @@ msgstr "el programa %s no parece ser ejecutable" #: ../IkiWiki/Wrapper.pm:20 msgid "cannot create a wrapper that uses a setup file" -msgstr "no puedo crear un programa envoltorio que utiliza un archivo de configuración" +msgstr "" +"no puedo crear un programa envoltorio que utiliza un archivo de configuración" #: ../IkiWiki/Wrapper.pm:24 msgid "wrapper filename not specified" @@ -1074,4 +1083,3 @@ msgstr "" #: ../auto.setup:23 msgid "What is the domain name of the web server?" msgstr "¿ Cuál es el dominio para el servidor web ?" - diff --git a/po/fr.po b/po/fr.po index 399fec2a3..eb2623fab 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.04\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-14 03:04-0500\n" +"POT-Creation-Date: 2009-03-08 19:02-0400\n" "PO-Revision-Date: 2009-02-26 21:28+0100\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -21,35 +21,41 @@ msgstr "" msgid "You need to log in first." msgstr "Vous devez d'abord vous identifier." -#: ../IkiWiki/CGI.pm:145 +#: ../IkiWiki/CGI.pm:146 +msgid "" +"probable misconfiguration: sslcookie is set, but you are attepting to login " +"via http, not https" +msgstr "" + +#: ../IkiWiki/CGI.pm:149 msgid "login failed, perhaps you need to turn on cookies?" msgstr "Échec de l'identification, vous devez autoriser les cookies." -#: ../IkiWiki/CGI.pm:163 ../IkiWiki/CGI.pm:294 +#: ../IkiWiki/CGI.pm:168 ../IkiWiki/CGI.pm:299 msgid "Your login session has expired." msgstr "Session d'authentification expirée." -#: ../IkiWiki/CGI.pm:184 +#: ../IkiWiki/CGI.pm:189 msgid "Login" msgstr "S’identifier" -#: ../IkiWiki/CGI.pm:185 +#: ../IkiWiki/CGI.pm:190 msgid "Preferences" msgstr "Préférences" -#: ../IkiWiki/CGI.pm:186 +#: ../IkiWiki/CGI.pm:191 msgid "Admin" msgstr "Administrateur" -#: ../IkiWiki/CGI.pm:226 +#: ../IkiWiki/CGI.pm:231 msgid "Preferences saved." msgstr "Les préférences ont été enregistrées." -#: ../IkiWiki/CGI.pm:257 +#: ../IkiWiki/CGI.pm:262 msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1204 +#: ../IkiWiki/CGI.pm:390 ../IkiWiki/CGI.pm:391 ../IkiWiki.pm:1209 msgid "Error" msgstr "Erreur" @@ -177,8 +183,8 @@ msgid "" "Sorry, but that looks like spam to blogspam: " msgstr "" -"Désolé, mais ceci ressemble à un spam à destination de blogspam: " +"Désolé, mais ceci ressemble à un spam à destination de blogspam: " #: ../IkiWiki/Plugin/brokenlinks.pm:33 ../IkiWiki/Plugin/editpage.pm:233 #: ../IkiWiki/Plugin/inline.pm:354 ../IkiWiki/Plugin/opendiscussion.pm:26 @@ -257,7 +263,7 @@ msgstr "Modération du commentaire" msgid "comment moderation" msgstr "modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:750 +#: ../IkiWiki/Plugin/comments.pm:751 msgid "Comments" msgstr "Commentaires" @@ -813,16 +819,16 @@ msgstr "Téléchargement direct des données" msgid "parse fail at line %d: %s" msgstr "Erreur d'analyse à la ligne %d : %s" -#: ../IkiWiki/Plugin/template.pm:28 +#: ../IkiWiki/Plugin/template.pm:29 msgid "missing id parameter" msgstr "Paramètre d'identification manquant" -#: ../IkiWiki/Plugin/template.pm:35 +#: ../IkiWiki/Plugin/template.pm:36 #, perl-format msgid "template %s not found" msgstr "Modèle de page %s introuvable" -#: ../IkiWiki/Plugin/template.pm:54 +#: ../IkiWiki/Plugin/template.pm:55 msgid "failed to process:" msgstr "Échec du traitement :" @@ -1036,12 +1042,12 @@ msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1187 +#: ../IkiWiki.pm:1192 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de pré traitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1725 +#: ../IkiWiki.pm:1730 msgid "yes" msgstr "oui" @@ -1064,4 +1070,3 @@ msgstr "Identifiant de l'administrateur (utilisateur du wiki ou openid) :" #: ../auto.setup:23 msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" - diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 519417902..ffe2d09e3 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-03-01 15:03-0500\n" +"POT-Creation-Date: 2009-03-08 19:02-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3