Skip to content

Commit

Permalink
Fix russian in tags
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Johnson <arachnid@notdot.net>
  • Loading branch information
Denis authored and Arachnid committed Mar 18, 2009
1 parent 0037d3c commit 22f7890
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions handlers/bloog/blog.py
Expand Up @@ -105,6 +105,7 @@ def get_tag_key(tag_name):
def process_tag(tag_name, tags):
# Check tag_name against all 'name' values in tags and coerce
tag_name = tag_name.strip()
tag_name = unicode(tag_name)
lowercase_name = tag_name.lower()
for tag in tags:
if lowercase_name == tag['name'].lower():
Expand Down Expand Up @@ -509,9 +510,7 @@ def delete(self, year, month, perm_stem):

class TagHandler(restful.Controller):
def get(self, encoded_tag):
tag = re.sub('(%25|%)(\d\d)',
lambda cmatch: chr(string.atoi(cmatch.group(2), 16)),
encoded_tag) # No urllib.unquote in AppEngine?
tag = unicode(urllib.unquote(encoded_tag), config.BLOG["charset"])
page = view.ViewPage()
page.render_query(
self, 'articles',
Expand Down

0 comments on commit 22f7890

Please sign in to comment.