changeset 3441:8230be5f24d7

wiki parser: removed protocol check for (image) transclusion
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 27 Mar 2008 14:20:01 +0100
parents 41ad5058952b
children fe130d233204
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 17 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Sat Mar 22 03:07:36 2008 +0100
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Mar 27 14:20:01 2008 +0100
@@ -693,27 +693,25 @@
         m = self.link_target_re.match(target)
         if m:
             if m.group('extern_addr'):
-                scheme = m.group('extern_scheme')
+                # currently only supports ext. image inclusion
                 target = m.group('extern_addr')
                 desc = self._transclude_description(desc, target)
-                if scheme.startswith('http'): # can also be https
-                    # currently only supports ext. image inclusion
-                    tag_attrs, query_args = self._get_params(params,
-                                                             tag_attrs={'class': 'external_image',
-                                                                        'alt': desc,
-                                                                        'title': desc, },
-                                                             acceptable_attrs=acceptable_attrs_img)
-                    return self.formatter.image(src=target, **tag_attrs)
-                    # FF2 has a bug with target mimetype detection, it looks at the url path
-                    # and expects to find some "filename extension" there (like .png) and this
-                    # (not the response http headers) will set the default content-type of
-                    # the object. This will often work for staticly served files, but
-                    # fails for MoinMoin attachments (they don't have the filename.ext in the
-                    # path, but in the query string). FF3 seems to have this bug fixed, opera 9.2
-                    # also works.
-                    #return (self.formatter.transclusion(1, data=target) +
-                    #        desc +
-                    #        self.formatter.transclusion(0))
+                tag_attrs, query_args = self._get_params(params,
+                                                         tag_attrs={'class': 'external_image',
+                                                                    'alt': desc,
+                                                                    'title': desc, },
+                                                         acceptable_attrs=acceptable_attrs_img)
+                return self.formatter.image(src=target, **tag_attrs)
+                # FF2 has a bug with target mimetype detection, it looks at the url path
+                # and expects to find some "filename extension" there (like .png) and this
+                # (not the response http headers) will set the default content-type of
+                # the object. This will often work for staticly served files, but
+                # fails for MoinMoin attachments (they don't have the filename.ext in the
+                # path, but in the query string). FF3 seems to have this bug fixed, opera 9.2
+                # also works.
+                #return (self.formatter.transclusion(1, data=target) +
+                #        desc +
+                #        self.formatter.transclusion(0))
 
             elif m.group('attach_scheme'):
                 scheme = m.group('attach_scheme')