Remove unnecessary escaping of volume name

Variable contents in Django templates are escaped by default, no need
to do it explicitly.

Change-Id: I0b9619b7b1605bcdb17fe3b7204bf6e6c2520454
Closes-Bug: #1597751
This commit is contained in:
Timur Sufiev 2016-07-26 15:41:22 +03:00 committed by Vladislav Kuzmin
parent 4b034f7444
commit d2b1a9cbcc
1 changed files with 1 additions and 8 deletions

View File

@ -14,9 +14,7 @@
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils import html
from django.utils.http import urlencode
from django.utils import safestring
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
@ -162,12 +160,7 @@ class UpdateRow(tables.Row):
class SnapshotVolumeNameColumn(tables.WrappingColumn):
def get_raw_data(self, snapshot):
volume = snapshot._volume
if volume:
volume_name = volume.name
volume_name = html.escape(volume_name)
else:
volume_name = _("Unknown")
return safestring.mark_safe(volume_name)
return volume.name if volume else _("Unknown")
def get_link_url(self, snapshot):
volume = snapshot._volume