changeset 153:3abe0bd083b2

text_x_arnica: added formatter to self and replaced wikiutil.escape with formatter.text
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 11 Jul 2008 17:47:57 +0200
parents 7438cd3fdfba
children 67697aaa2b88
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Fri Jul 11 17:23:27 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Fri Jul 11 17:47:57 2008 +0200
@@ -188,7 +188,7 @@
         # ToDo change to "in dict"
         if tags.has_key('EXIF DateTimeOriginal'):
             date = str(tags['EXIF DateTimeOriginal'])
-            date = wikiutil.escape(date.replace(':', '-', 2))
+            date = self.formatter.text(date.replace(':', '-', 2))
     return date
 
 def _get_files(request, pagename):
@@ -213,6 +213,7 @@
         self.pagename = request.page.page_name
         self.raw = raw
         self.request = request
+        self.formatter = request.formatter
         self.form = None
         self._ = request.getText
         # ToDo add formatter 
@@ -229,7 +230,7 @@
         except ValueError, err:
             msg = u"arnica: %s" % err.args[0]
             # ToDo use formatter
-            request.write(wikiutil.escape(msg))
+            request.write(self.formatter.text(msg))
 
         self.inner_table_style = ' style="border-style:none; margin:10px;"'
         self.td_style = ' align="center" style="padding:0; margin:2px 2px; border-style:none"'
@@ -423,7 +424,7 @@
                 self.web.append(webnail)
                 self.thumb.append(thumbfile)
                 date = get_exif_info(att_file)
-                self.exif_date.append(wikiutil.escape(date, quote=1))
+                self.exif_date.append(self.formatter.text(date))
 
     def to_wikitext(self, text):
         """
@@ -448,7 +449,7 @@
             if line.startswith('[[') and line.endswith(']]'):
                 img, alias = line[2:-2].split('|', 1)
                 alias = alias.strip()
-                alias = wikiutil.escape(alias, quote=1)
+                alias = self.formatter.text(alias)
                 text.append(alias)
                 image.append(img.strip())
         return {