Fix the issue to unescape unneed characters in image property
Currently, powervc driver image sync service will sync the powervc image meta properties to hosting openstack side, it's using HTMLParser.unescape() to unescape the escape chars. It's over used, only "<", and ">" that corresponding escpae char is "<" & ">" is needed to be unescaped. Fix this only to unescape this two chars. Closes-Bug: #1362886 Change-Id: I11db0cab46c8707a6c306f9967d7afc08fbad3ec
This commit is contained in:
parent
00305fa64d
commit
64233b7e1c
@ -3657,7 +3657,9 @@ class PowerVCImageManager(service.Service):
|
||||
if props is not None:
|
||||
for key in props.keys():
|
||||
if key in constants.IMAGE_UNESCAPE_PROPERTIES:
|
||||
props[key] = HTMLParser.HTMLParser().unescape(props[key])
|
||||
if props[key]:
|
||||
propVal = props[key].replace("<", "<")
|
||||
props[key] = propVal.replace(">", ">")
|
||||
|
||||
def _get_image_properties(self, v1image_dict, default_props=None):
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user