implement proper 'destroy' functions in Converter
[enigma2.git] / lib / python / Components / Sources / StaticText.py
1 from Source import Source
2
3 class StaticText(Source):
4         # filter is a function which filters external, untrusted strings
5         # this must be done to avoid XSS attacks!
6         
7         # (and is probably not done yet. For this reason, be careful when
8         # using this on HTML pages. *DO* provide your filter function.)
9         def __init__(self, text = "", filter = lambda x: x):
10                 Source.__init__(self)
11                 self.text = text
12                 self.filter = filter
13
14         def handleCommand(self, cmd):
15                 self.text = self.filter(cmd)