Browse Source

Fix tuple; fix encoding makeshift URLs.

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
964be6056e
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      earwigbot/wiki/category.py
  2. +2
    -1
      earwigbot/wiki/page.py

+ 1
- 1
earwigbot/wiki/category.py View File

@@ -126,7 +126,7 @@ class Category(Page):
self.site.SERVICE_API: self._get_size_via_api, self.site.SERVICE_API: self._get_size_via_api,
self.site.SERVICE_SQL: self._get_size_via_sql self.site.SERVICE_SQL: self._get_size_via_sql
} }
return self.site.delegate(services, (member_type))
return self.site.delegate(services, (member_type,))


@property @property
def size(self): def size(self):


+ 2
- 1
earwigbot/wiki/page.py View File

@@ -501,7 +501,8 @@ class Page(CopyrightMixIn):
if self._fullurl: if self._fullurl:
return self._fullurl return self._fullurl
else: else:
slug = quote(self._title.replace(" ", "_"), safe="/:")
encoded = self._title.encode("utf8").replace(" ", "_")
slug = quote(encoded, safe="/:")
path = self.site._article_path.replace("$1", slug) path = self.site._article_path.replace("$1", slug)
return ''.join((self.site.url, path)) return ''.join((self.site.url, path))




Loading…
Cancel
Save