X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/3e35c703607b5f135828fa5efe2beee669c7a4c2..HEAD:/lib/python/Components/Sources/StaticText.py diff --git a/lib/python/Components/Sources/StaticText.py b/lib/python/Components/Sources/StaticText.py index 2f8f0e18..8e6f824e 100644 --- a/lib/python/Components/Sources/StaticText.py +++ b/lib/python/Components/Sources/StaticText.py @@ -1,16 +1,24 @@ from Source import Source -from Components.Element import cached class StaticText(Source): # filter is a function which filters external, untrusted strings # this must be done to avoid XSS attacks! - + # (and is probably not done yet. For this reason, be careful when # using this on HTML pages. *DO* provide your filter function.) def __init__(self, text = "", filter = lambda x: x): Source.__init__(self) - self.text = text + self.__text = text self.filter = filter def handleCommand(self, cmd): self.text = self.filter(cmd) + + def getText(self): + return self.__text + + def setText(self, text): + self.__text = text + self.changed((self.CHANGED_ALL,)) + + text = property(getText, setText)