1 from Source import Source
2 from Components.Element import cached
4 class StaticText(Source):
5 # filter is a function which filters external, untrusted strings
6 # this must be done to avoid XSS attacks!
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):
15 def handleCommand(self, cmd):
16 self.text = self.filter(cmd)