changeset 1724:40345ea89a70

text_html_text_moin_wiki: converts now images on subpages, http images independend from ImageLink
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 09 Jan 2007 00:00:17 +0100
parents 4916528e1cd7
children ef67391ffced
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Mon Jan 08 23:56:13 2007 +0100
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Tue Jan 09 00:00:17 2007 +0100
@@ -1191,14 +1191,20 @@
 
         # Attachment image
         if (title and title.startswith("attachment:") and
-            wikiutil.isPicture(wikiutil.url_unquote(title[len("attachment:"):]))):
-            if height is None and width is None and target is None:
+            wikiutil.isPicture(wikiutil.url_unquote(title[len("attachment:"):]))) or title is None or src.startswith('http'):
+            if height is None and width is None and target is None and alt is None:
                 self.text.extend([self.white_space,
                                   wikiutil.url_unquote(title),
                                   self.white_space])
             else:
                 # use ImageLink for resized images
-                il_parms = "%s" % wikiutil.url_unquote(title[len("attachment:"):])
+                if title is None:
+                    il_parms = "%s" % wikiutil.url_unquote(src)
+                else:
+                    if src.startswith('http'):
+                        il_parms = "%s" % wikiutil.url_unquote(src)
+                    else:
+                        il_parms = "%s" % wikiutil.url_unquote(title[len("attachment:"):])
                 if target is not None:
                     il_parms += ",%s" % target
                 if width is not None: