Refs #14807 -- Removed unneeded mark_safe call

This commit is contained in:
Claude Paroz 2017-10-22 12:10:27 +02:00
parent 21a3a29dc9
commit 68407e3545
1 changed files with 1 additions and 2 deletions

View File

@ -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):