Roman Prokofyev avatar Roman Prokofyev committed ac4f583

unicode characters in tags fixed

Comments (0)

Files changed (1)


 # regex used to find links in an article
 LINK_RE = re.compile('<a.*?href="(.*?)".*?>(.*?)</a>', re.I|re.M)
 TITLE_RE = re.compile('<title>(.*?)</title>', re.I|re.M)
-TAG_RE = re.compile('[^a-z0-9\-_\+\:\.]?', re.I)
+#TAG_RE = re.compile('[^a-z0-9\-_\+\:\.]?', re.I)
 def get_name(user):
     def clean_tag(name):
         """Replace spaces with dashes, in case someone adds such a tag manually"""
-        name = name.replace(' ', '-').encode('ascii', 'ignore')
-        name = TAG_RE.sub('', name)
+        name = name.replace(' ', '-')
+        #name = TAG_RE.sub('', name)
         return name.lower().strip()
     def save(self, *args, **kwargs):
         return menu
 class Article(TranslatedDocument):
     title = models.CharField(max_length=100)
     slug = models.SlugField(unique_for_year='publish_date')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.