mirror of https://github.com/django/django.git
Refs #14807 -- Removed unneeded mark_safe call
This commit is contained in:
parent
21a3a29dc9
commit
68407e3545
|
@ -6,7 +6,6 @@ from importlib import import_module
|
|||
from django.conf import settings
|
||||
from django.utils import dateformat, datetime_safe, numberformat
|
||||
from django.utils.functional import lazy
|
||||
from django.utils.safestring import mark_safe
|
||||
from django.utils.translation import (
|
||||
check_for_language, get_language, to_locale,
|
||||
)
|
||||
|
@ -195,7 +194,7 @@ def localize(value, use_l10n=None):
|
|||
if isinstance(value, str): # Handle strings first for performance reasons.
|
||||
return value
|
||||
elif isinstance(value, bool): # Make sure booleans don't get treated as numbers
|
||||
return mark_safe(str(value))
|
||||
return str(value)
|
||||
elif isinstance(value, (decimal.Decimal, float, int)):
|
||||
return number_format(value, use_l10n=use_l10n)
|
||||
elif isinstance(value, datetime.datetime):
|
||||
|
|
Loading…
Reference in New Issue