Escape resource name

Change-Id: Ia39c6677fb5d53474611ef227cb793205a641a28
This commit is contained in:
Feilong Wang 2018-08-24 05:53:36 +12:00
parent 00b8e4b19d
commit 91dcb51d28
1 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import logging
import six
from django.conf import settings
from django.utils.html import escape
from openstack_dashboard.api import base
@ -175,6 +176,8 @@ def _parse_invoice(invoice):
for product in services["breakdown"]:
for order_line in services["breakdown"][product]:
order_line["product"] = product
order_line["resource_name"] = escape(
order_line["resource_name"])
details.append(order_line)
LOG.debug("Got quotations successfully.")
return parsed
@ -193,6 +196,8 @@ def _parse_quotation(quotation, merged_quotations, region=None):
for product in services["breakdown"]:
for order_line in services["breakdown"][product]:
order_line["product"] = product
order_line["resource_name"] = escape(
order_line["resource_name"])
details.append(order_line)
return parsed