diff MoinMoin/formatter/__init__.py @ 2761:3a6a25169f55

use rsplit for splitting off anchor
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 25 Aug 2007 17:42:25 +0200
parents 907b9e60c232
children c9dd12befda7
line wrap: on
line diff
--- a/MoinMoin/formatter/__init__.py	Sat Aug 25 17:27:14 2007 +0200
+++ b/MoinMoin/formatter/__init__.py	Sat Aug 25 17:42:25 2007 +0200
@@ -11,6 +11,7 @@
 
 from MoinMoin.util import pysupport
 from MoinMoin import wikiutil
+from MoinMoin.support.python_compatibility import rsplit
 
 modules = pysupport.getPackageModules(__file__)
 
@@ -102,7 +103,7 @@
         wikitag, wikiurl, wikitail, wikitag_bad = wikiutil.resolve_interwiki(self.request, interwiki, pagename)
         if wikitag == 'Self' or wikitag == self.request.cfg.interwikiname:
             if '#' in wikitail:
-                wikitail, kw['anchor'] = wikitail.split('#', 1)
+                wikitail, kw['anchor'] = rsplit(wikitail, '#', 1)
                 wikitail = wikiutil.url_unquote(wikitail)
             return self.pagelink(on, wikitail, **kw)
         return ''