nephila / djangocms-blog

django CMS blog application - Support for multilingual posts, placeholders, social network meta tags and configurable apphooks
https://djangocms-blog.readthedocs.io
BSD 3-Clause "New" or "Revised" License
391 stars 192 forks source link

Urls and unicode tags #799

Open adrien-delhorme opened 3 months ago

adrien-delhorme commented 3 months ago

Description

URL for tags list view uses slug as path converter, which only accepts ASCII characters.: https://github.com/nephila/djangocms-blog/blob/30dbb72643b30fd4a8583f6d79006a81e569a23f/djangocms_blog/urls.py#L37

But django-taggit allows unicode in tags' slugs.

When a reverse() is done on this URL, it throws an exception:

Exception Type: NoReverseMatch
Exception Value: Reverse for 'posts-tagged' with keyword arguments '{'tag': 'en-été'}' not found. 1 pattern(s) tried: ['fr/blog/tag/(?P<tag>[-a-zA-Z0-9_]+)/\\Z']

Steps to reproduce

  1. Create a tag with a label containing unicode chars (for example : "En été")
  2. Assign this tag to a Post
  3. Add the BlogTagsPlugin on a page

Versions

Python == 3.11 Django == 3.2.25 djangocms-blog == 2.0.7