def renderRequestTrust(self): result = [ Panel(heading='Untrusted', content=[ T.p(id='untrusted')[ T.a(href='#', onclick='return IGBManager.requestTrust()')['Please trust me!'] ], T.p()[ T.a(href='#', onclick='return IGBManager.reload()')['Reload page'], ' when you accepted trust request' ] ]) ] return result
def test_escaping(): """escaping, xml() directive""" template = T.html[ T.head[T.title[my_name()]], T.body[ T.div(style='width: 400px;<should be &escaped&>')[ T.p(class_='foo')['&&&'], T.p['Coffee', E.nbsp, E.amp, E.nbsp, 'cream'], xml ("""<div>this should be <u>unescaped</u> & unaltered.</div>""") ] ] ] output = flatten(template) assert output == ('<html><head><title>test_escaping</title></head>' '<body><div style="width: 400px;<should be &escaped&>">' '<p class="foo">&&&</p><p>Coffee & cream</p>' '<div>this should be <u>unescaped</u> & unaltered.</div></div>' '</body></html>')