aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMathieu Blondel <mathieu@mblondel.org>2007-05-27 15:07:24 +0000
committerMathieu BlondelMathieu Blondel <mathieu@mblondel.orgmathieu@mblondel.org>2007-05-27 15:07:24 +0000
commita4e173409d4e43cf6e34fef9fb4110aecc117411 (patch)
tree614e07d464a7b910c71584617fd253ebd349d1d7 /src
parentcc14af9df29b02142f92e45c96af2436902fe883 (diff)
downloadwikipediafs-a4e173409d4e43cf6e34fef9fb4110aecc117411.tar.gz
article.py: encode urls. This fixes the problem with articles having special
characters like &. git-svn-id: http://svn.code.sf.net/p/wikipediafs/code/trunk@56 59acd704-e115-0410-a914-e735a229ed7c
Diffstat (limited to 'src')
-rw-r--r--src/wikipediafs/article.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/wikipediafs/article.py b/src/wikipediafs/article.py
index 9170f4e..f2d321d 100644
--- a/src/wikipediafs/article.py
+++ b/src/wikipediafs/article.py
@@ -66,13 +66,15 @@ class Article(SGMLParser):
self.wpEditToken = None
self.last_get = 0
- # url patterns
- self.edit_page = "%s?title=%s&action=edit" % \
- (self.basename, self.name)
+ # url patterns
+ title = urllib.urlencode({"title" : self.name})
+
+ self.edit_page = "%s?%s&action=edit" % \
+ (self.basename, title)
# basename must include a leading /
- self.submit_page = "%s?title=%s&action=submit" % \
- (self.basename, self.name)
+ self.submit_page = "%s?%s&action=submit" % \
+ (self.basename, title)
def start_textarea(self,attrs):
"""