Example #1
0
 def eval_code(self, context, markup, honor_autoescape=False):
     if markup in context:
         value = context[markup]
     else:
         value = eval(markup, g, context)
     if callable(value):
         value = value()
     if honor_autoescape:
         value = html_escape(value)
     return value
Example #2
0
File: form.py Project: daineX/PyTTP
 def render(self):
     return '<textarea name="%s" id="%s">%s</textarea>' % (self.name, self.id,
         html_escape(self.raw_value))
Example #3
0
File: form.py Project: daineX/PyTTP
 def render(self):
     return '<input name="%s" id="%s" type="hidden" value="%s" />' % (self.name, self.id, html_escape(self.raw_value))