changeset 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 898a544b8f74
children 425d072840ab d6057ed413e6
files MoinMoin/formatter/text_html.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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: