changeset 93:64797a5fc3d9

text_x_arnica: check alias for [[ and ]]
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 22 Jun 2008 12:09:14 +0200
parents bb0f35d0e9c5
children 68102c2191f9
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Sun Jun 22 11:47:44 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Sun Jun 22 12:09:14 2008 +0200
@@ -357,11 +357,12 @@
         text = []
 
         for line in quotes:
-            img, alias = line[2:-2].split('|', 1)
-            alias = alias.strip()
-            alias = wikiutil.escape(alias, quote=1)
-            text.append(alias)
-            image.append(img.strip())
+            if line.startswith('[[') and line.endswith(']]'):
+                img, alias = line[2:-2].split('|', 1)
+                alias = alias.strip()
+                alias = wikiutil.escape(alias, quote=1)
+                text.append(alias)
+                image.append(img.strip())
 
         return {
             'alias': text,