mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-12-07 04:52:29 -05:00
allow tags to contain chars, not only English alphabet (#801)
* allow tags to contain chars, not only English alphabet
This commit is contained in:
@@ -16,7 +16,6 @@ from django.core.files import File
|
||||
from django.db import connection, models
|
||||
from django.db.models.signals import m2m_changed, post_delete, post_save, pre_delete
|
||||
from django.dispatch import receiver
|
||||
from django.template.defaultfilters import slugify
|
||||
from django.urls import reverse
|
||||
from django.utils import timezone
|
||||
from django.utils.html import strip_tags
|
||||
@@ -1000,10 +999,8 @@ class Tag(models.Model):
|
||||
return True
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.title = slugify(self.title[:99])
|
||||
strip_text_items = ["title"]
|
||||
for item in strip_text_items:
|
||||
setattr(self, item, strip_tags(getattr(self, item, None)))
|
||||
self.title = helpers.get_alphanumeric_only(self.title)
|
||||
self.title = self.title[:99]
|
||||
super(Tag, self).save(*args, **kwargs)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user