Permalink
Browse files

Backport fixes to URL escaping from blogofile 0.8 plugin. Fixes issue

  • Loading branch information...
1 parent 9f6a94c commit 042eec8f196c98e5b775b622c3b22fe486dbe886 @EnigmaCurry committed Apr 16, 2011
Showing with 5 additions and 1 deletion.
  1. +2 −0 .gitignore
  2. +3 −1 blogofile/site_init/blog_controller/_controllers/blog/post.py
View
@@ -10,3 +10,5 @@
/blogofile/site_init/*.zip
_site/*
_documentation/themes/blogofile/layout.html
+/.tox/*
+/MANIFEST
@@ -18,6 +18,7 @@
import codecs
import base64
import urllib
+from xml.sax import saxutils
import pytz
import yaml
@@ -169,7 +170,8 @@ def __post_process(self):
datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
if not self.slug:
- self.slug = re.sub("[ ?]", "-", self.title).lower()
+ self.slug = saxutils.unescape(self.title)
+ self.slug = re.sub("[^a-zA-Z0-9$\-_\.+!*'(),]", "-", self.slug).lower()
if not self.date:
self.date = datetime.datetime.now(pytz.timezone(self.__timezone))

0 comments on commit 042eec8

Please sign in to comment.