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