changeset 1740:2f37f1914570

gui converter, ImageLink: minor optimizations
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 13 Jan 2007 23:43:37 +0100
parents aef7aa0effc3
children 7919292b1e24 1aa9dfd0ad34
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Jan 13 23:36:43 2007 +0100
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Jan 13 23:43:37 2007 +0100
@@ -1194,9 +1194,9 @@
             target = node.attributes.get("target").nodeValue
 
         # Attachment image
-        if (title and title.startswith("attachment:") and
-            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 or alt is ''):
+        if (title and title.startswith("attachment:") and 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 not alt:
                 self.text.extend([self.white_space,
                                   wikiutil.url_unquote(title),
                                   self.white_space])
@@ -1205,7 +1205,7 @@
                 if title is None:
                     il_parms = "%s" % wikiutil.url_unquote(src)
                 else:
-                    if src.startswith('http'):
+                    if src.startswith('http:'):
                         il_parms = "%s" % wikiutil.url_unquote(src)
                     else:
                         il_parms = "%s" % wikiutil.url_unquote(title[len("attachment:"):])