diff MoinMoin/formatter/text_html.py @ 3415:cb22f4c4a0fd

fix interwiki links using correct query arg separator for the case that there are query args in the interwiki map entry and additionally given in the link markup
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 22 Mar 2008 17:35:34 +0100
parents 8a54a5512c86
children 1d5995a6a0e2 f8e4e84525e8
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Sat Mar 22 16:49:43 2008 +0100
+++ b/MoinMoin/formatter/text_html.py	Sat Mar 22 17:35:34 2008 +0100
@@ -500,7 +500,8 @@
             if on:
                 href = wikiutil.join_wiki(wikiurl, wikitail)
                 if querystr:
-                    href += '?%s' % wikiutil.makeQueryString(querystr)
+                    separator = ('?', '&')['?' in href]
+                    href = '%s%s%s' % (href, separator, wikiutil.makeQueryString(querystr))
                 if wikitag_bad:
                     html_class = 'badinterwiki'
                 else: