changeset 104:67f71c7a8c43

some unicode related (and other) fixes for the last patches imported from: moin--main--1.5--patch-106
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 15 Oct 2005 20:22:05 +0000
parents 8b3945dbbb4d
children 9ad707f6b4e2
files MoinMoin/formatter/text_html.py MoinMoin/macro/PageHits.py MoinMoin/wikiutil.py
diffstat 3 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Sat Oct 15 20:05:05 2005 +0000
+++ b/MoinMoin/formatter/text_html.py	Sat Oct 15 20:22:05 2005 +0000
@@ -244,7 +244,7 @@
         if wikitag == 'Self': # for own wiki, do simple links
             if wikitail.find('#') > -1:
                 wikitail, kw['anchor'] = wikitail.split('#', 1)
-            wikitail = wikiutil.url_unquote(wikitail, want_unicode=False)
+            wikitail = wikiutil.url_unquote(wikitail)
             try: # XXX this is the only place where we access self.page - do we need it? Crashes silently on actions!
                 return apply(self.pagelink, (on, wikiutil.AbsPageName(self.request, self.page.page_name, wikitail)), kw)
             except:
--- a/MoinMoin/macro/PageHits.py	Sat Oct 15 20:05:05 2005 +0000
+++ b/MoinMoin/macro/PageHits.py	Sat Oct 15 20:22:05 2005 +0000
@@ -15,7 +15,7 @@
 # Set pickle protocol, see http://docs.python.org/lib/node64.html
 PICKLE_PROTOCOL = pickle.HIGHEST_PROTOCOL
 
-from MoinMoin import caching
+from MoinMoin import caching, config
 from MoinMoin.Page import Page
 from MoinMoin.logfile import eventlog, logfile
 
@@ -62,6 +62,7 @@
             if event[0] <= cacheDate:
                 break
             page = event[2].get('pagename', None)
+            page = page.decode(config.charset)
             if page:
                 hits[page] = hits.get(page, 0) + 1
                 changed = True
--- a/MoinMoin/wikiutil.py	Sat Oct 15 20:05:05 2005 +0000
+++ b/MoinMoin/wikiutil.py	Sat Oct 15 20:22:05 2005 +0000
@@ -800,7 +800,7 @@
         for pname in getPlugins('parser', cfg):
             try:
                 Parser = importPlugin(cfg, 'parser', pname, 'Parser')
-            except wikiutil.PluginMissingError:
+            except PluginMissingError:
                 continue
             if hasattr(Parser, 'extensions'):
                 exts = Parser.extensions