From a9c17a7b597399b4b7a2b285a4b8607a8fe2df19 Mon Sep 17 00:00:00 2001 From: cmdln Date: Sat, 18 Jun 2011 15:45:00 -0400 Subject: [PATCH] Fix handling of apostrophe in title. --- append.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/append.py b/append.py index 3852ce1..2ae7c4e 100755 --- a/append.py +++ b/append.py @@ -180,6 +180,7 @@ def __permalink(title): def __title(title): fixed = title fixed = re.sub(u'\u2013', '-', fixed) + fixed = re.sub(u'\u2019', '\'', fixed) return fixed @@ -230,6 +231,7 @@ def __archive_slug(title): """ slug = re.sub('\([^0-9]\)-\([^0-9]\)', '\1\2', title) slug = re.sub(u'\u2013', '-', slug) + slug = re.sub(u'\u2019', '', slug) slug = re.sub('[^A-Za-z0-9\-\.]', ' ', slug) slug = re.sub(' {2,}', ' ', slug) tokens = slug.split(' ')