diff MoinMoin/macro/__init__.py @ 1347:b65614f8a393

use page.link_to(_raw) more often
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Aug 2006 16:59:51 +0200
parents c0f994eb1455
children e219092e1a0d
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Sun Aug 20 15:51:08 2006 +0200
+++ b/MoinMoin/macro/__init__.py	Sun Aug 20 16:59:51 2006 +0200
@@ -245,11 +245,10 @@
             links = [letter_link(letter) for letter in index_letters]
             return "<p>%s%s</p>" % (' | '.join(links), additional_html)
 
-        qpagename = wikiutil.quoteWikinameURL(self.formatter.page.page_name)
+        page = self.formatter.page
         allpages_txt = (_('Include system pages'), _('Exclude system pages'))[allpages]
-        index = _make_index_key(index_letters, u"""<br>
-<a href="%s?allpages=%d">%s</a>
-""" % (qpagename, not allpages, allpages_txt) )
+        allpages_link = page.link_to(self.request, allpages_txt, querystr={'allpages': allpages and '0' or '1'})
+        index = _make_index_key(index_letters, u'<br>%s' % allpages_link)
         # ?action=titleindex and ?action=titleindex&mimetype=text/xml removed
 
         return u'%s%s' % (index, u''.join(html))