changeset 294:37e23d2778f0

arnica_slides: bug fix for not rendered description
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 05 Oct 2008 11:42:23 +0200
parents e65d477491d1
children b106dd7b0336
files data/plugin/action/arnica_slides.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Thu Sep 25 18:32:50 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Sun Oct 05 11:42:23 2008 +0200
@@ -18,6 +18,7 @@
 from MoinMoin.Page import Page
 from MoinMoin.action import ActionBase, AttachFile, cache
 from MoinMoin.packages import packLine, unpackLine
+from MoinMoin.parser.text_moin_wiki import Parser as WikiParser
 
 try:
     import Image
@@ -248,7 +249,7 @@
         "this_webnail_list": this_webnail_list,
         "this_webnail_name": packLine(images),
         "original_images": packLine(original_images),
-        "this_alias_list": wikiutil.escape(packLine(alias), quote=1),
+        "this_alias_list": wikiutil.escape(packLine([wikiutil.renderText(request, WikiParser, alias_name.replace('<<BR>>',' ')) for alias_name in alias]), quote=1),
         "this_exif_date_list": wikiutil.escape(packLine(exif_date), quote=1),
         "option_webnails": option_webnail,
     }
@@ -257,7 +258,7 @@
 <div class="arnica-slides">
 %(navigation)s
 <div class="image">
-<img src="%(server)s%(this_image)s" name="show" alt="%(this_alias_text)s,%(this_exif_date_text)s">
+<img src="%(server)s%(this_image)s" name="show" alt="%(alt_text)s">
 </div>
 <div class="image-description">
 <span id="arnica_alias_text"><a href=%(link_url)s>%(this_alias_text)s</a></span>,
@@ -267,7 +268,8 @@
 """ % {
         "server": request.getQualifiedURL(),
         "link_url": link_to_image,
-        "this_alias_text": wikiutil.escape(alias[idx], quote=1),
+        "alt_text": wikiutil.escape(alias[idx].replace('<<BR>>',' '), quote=1),
+        "this_alias_text": wikiutil.renderText(request, WikiParser, alias[idx].replace('<<BR>>',' ')),
         "this_exif_date_text": wikiutil.escape(exif_date[idx], quote=1),
         "this_image": image_url,
         "pagename": pagename,