aboutsummaryrefslogtreecommitdiff
path: root/RecordTimer.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-25 14:36:13 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-01-25 14:36:13 +0000
commit043ef5bb98a2b1605dd3704bb34b813697a66376 (patch)
tree6107c0dd910f3a705140cffe087613114c315452 /RecordTimer.py
parent266d4a5e9cdc02e8fd54481c2101078b5d62a93a (diff)
downloadenigma2-043ef5bb98a2b1605dd3704bb34b813697a66376.tar.gz
enigma2-043ef5bb98a2b1605dd3704bb34b813697a66376.zip
do xml conversions
Diffstat (limited to 'RecordTimer.py')
-rw-r--r--RecordTimer.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/RecordTimer.py b/RecordTimer.py
index a257b2fa..f9382e84 100644
--- a/RecordTimer.py
+++ b/RecordTimer.py
@@ -224,7 +224,10 @@ class RecordTimer(timer.Timer):
root = doc.childNodes[0]
for timer in elementsWithTag(root.childNodes, "timer"):
self.record(createTimer(timer))
-
+
+ def strToXML(self, str):
+ return str.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace("'", '&apos;'). replace('"', '&qout;')
+
def saveTimer(self):
#doc = xml.dom.minidom.Document()
#root_element = doc.createElement('timers')
@@ -277,8 +280,8 @@ class RecordTimer(timer.Timer):
list.append(' end="' + str(int(timer.end)) + '"')
list.append(' serviceref="' + str(timer.service_ref) + '"')
list.append(' repeated="' + str(int(timer.repeated)) + '"')
- list.append(' name="' + str(timer.name) + '"')
- list.append(' description="' + str(timer.description) + '"')
+ list.append(' name="' + str(self.strToXML(timer.name)) + '"')
+ list.append(' description="' + str(self.strToXML(timer.description)) + '"')
list.append(' eit="' + str(timer.eit) + '"')
list.append('>\n')