diff MoinMoin/formatter/text_html.py @ 1816:4a31739bc6e1

Page.url(): removed escaping support
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 25 Feb 2007 03:08:18 +0100
parents 57f12932915f
children 0194beaf511e
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Sat Feb 24 20:42:21 2007 +0100
+++ b/MoinMoin/formatter/text_html.py	Sun Feb 25 03:08:18 2007 +0100
@@ -529,7 +529,7 @@
                 else:
                     html_class = 'interwiki'
                 title = kw.get('title', wikitag)
-                return self.url(1, href, title=title, do_escape=1, css=html_class) # interwiki links with umlauts
+                return self.url(1, href, title=title, css=html_class) # interwiki links with umlauts
             else:
                 return self.url(0)
 
@@ -540,7 +540,7 @@
         Call once with on=1 to start the link, and again with on=0
         to end it (no other arguments are needed when on==0).
 
-        do_escape: XXX doesn't work yet
+        do_escape: filters url through wikiutil.escape
 
         Keyword params:
             url - the URL to link to; will go through Wiki URL mapping.
@@ -564,9 +564,8 @@
                 del kw['href']
             if url is not None:
                 url = wikiutil.mapURL(self.request, url)
-                # TODO just calling url_quote does not work, as it will also quote "http:" to "http%xx" X)
-                if 0: # do_escape: # protocol and server part must not get quoted, path should get quoted
-                    url = wikiutil.url_quote(url)
+                if do_escape:
+                    url = wikiutil.escape(url)
                 attrs['href'] = url
 
             if css: