diff options
| -rw-r--r-- | RecordTimer.py | 8 | ||||
| -rw-r--r-- | lib/python/Tools/XMLTools.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/RecordTimer.py b/RecordTimer.py index a5c179c4..faec5344 100644 --- a/RecordTimer.py +++ b/RecordTimer.py @@ -12,7 +12,7 @@ from Screens.SubserviceSelection import SubserviceSelection import NavigationInstance from time import localtime -from Tools.XMLTools import elementsWithTag, mergeText, filterXMLString +from Tools.XMLTools import elementsWithTag, mergeText, stringToXML from ServiceReference import ServiceReference # ok, for descriptions etc we have: @@ -291,10 +291,10 @@ class RecordTimer(timer.Timer): list.append('<timer') list.append(' begin="' + str(int(timer.begin)) + '"') list.append(' end="' + str(int(timer.end)) + '"') - list.append(' serviceref="' + str(timer.service_ref) + '"') + list.append(' serviceref="' + str(stringToXML(timer.service_ref)) + '"') list.append(' repeated="' + str(int(timer.repeated)) + '"') - list.append(' name="' + str(filterXMLString(timer.name)) + '"') - list.append(' description="' + str(filterXMLString(timer.description)) + '"') + list.append(' name="' + str(stringToXML(timer.name)) + '"') + list.append(' description="' + str(stringToXML(timer.description)) + '"') if timer.eit is not None: list.append(' eit="' + str(timer.eit) + '"') list.append(' disabled="' + str(int(timer.disabled)) + '"') diff --git a/lib/python/Tools/XMLTools.py b/lib/python/Tools/XMLTools.py index 161ca308..2fd896d9 100644 --- a/lib/python/Tools/XMLTools.py +++ b/lib/python/Tools/XMLTools.py @@ -23,5 +23,5 @@ def mergeText(nodelist): rc = rc + node.data return rc -def filterXMLString(text): - return str.replace('&', '&').replace('<', '<').replace('>', '>').replace("'", '''). replace('"', '"') +def stringToXML(text): + return str.replace('&', '&').replace('<', '<').replace('>', '>').replace("'", ''').replace('"', '"') |
