1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #29412 -- Stopped marking slugify() result as HTML safe.

This commit is contained in:
Claude Paroz
2018-07-14 10:38:18 +02:00
committed by Tim Graham
parent 861638a307
commit b004bd62e8
4 changed files with 10 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import json
import sys
from django.test import SimpleTestCase
from django.utils import text
@@ -179,6 +180,8 @@ class TestUtilsText(SimpleTestCase):
)
for value, output, is_unicode in items:
self.assertEqual(text.slugify(value, allow_unicode=is_unicode), output)
# interning the result may be useful, e.g. when fed to Path.
self.assertEqual(sys.intern(text.slugify('a')), 'a')
def test_unescape_entities(self):
items = [