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
56113cd808
commit
4d7fc1ad44
|
@ -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…
Reference in New Issue