aboutsummaryrefslogtreecommitdiff
path: root/wiki2html.py
diff options
context:
space:
mode:
Diffstat (limited to 'wiki2html.py')
-rw-r--r--wiki2html.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/wiki2html.py b/wiki2html.py
index 0330b92..05d4642 100644
--- a/wiki2html.py
+++ b/wiki2html.py
@@ -18,6 +18,8 @@
from wikimarkup import *
-from types import TupleType
from wikins import wiki_ns_re, wiki_ns
import re
-import urllib
+try:
+ from urllib import quote as url_quote
+except ImportError:
+ from urllib.parse import quote as url_quote
@@ -50,3 +52,3 @@ class HtmlWikiMarkup (WikiMarkup):
lang = self.lang
- return self.html_base % { 'lang' : lang } + urllib.quote(tgt)
+ return self.html_base % { 'lang' : lang } + url_quote(tgt)
@@ -86,3 +88,3 @@ class HtmlWikiMarkup (WikiMarkup):
if len(elt['content']) > 1:
- s = map(self.format, elt['content'])
+ s = [x for x in map(self.format, elt['content'])]
if s[0] == 'disambigR' or s[0] == 'wikiquote':

Return to:

Send suggestions and report system problems to the System administrator.