Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 8b41696

Browse files
committed
Fix previous xml_escape patch: replace doesn't work in place.
1 parent eb47d49 commit 8b41696

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

virtinst/util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ def get_phy_cpus(conn):
210210

211211
def xml_escape(str):
212212
"""Replaces chars ' " < > & with xml safe counterparts"""
213-
str.replace("&", "&amp;")
214-
str.replace("'", "&apos;")
215-
str.replace("\"", "&quot;")
216-
str.replace("<", "&lt;")
217-
str.replace(">", "&gt;")
213+
str = str.replace("&", "&amp;")
214+
str = str.replace("'", "&apos;")
215+
str = str.replace("\"", "&quot;")
216+
str = str.replace("<", "&lt;")
217+
str = str.replace(">", "&gt;")
218218
return str

0 commit comments

Comments
 (0)