OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
twisted
/
web
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/31/2022 06:22:38 AM
rwxr-xr-x
📄
__init__.py
699 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📁
__pycache__
-
03/31/2022 06:22:40 AM
rwxr-xr-x
📁
_auth
-
03/31/2022 06:22:39 AM
rwxr-xr-x
📄
_element.py
5.81 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_flatten.py
15.54 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_http2.py
48 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
_newclient.py
61.84 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
_responses.py
3.57 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
_stan.py
10.54 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
client.py
74.26 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
demo.py
554 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
distrib.py
11.45 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
domhelpers.py
8.44 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
error.py
12.49 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
guard.py
630 bytes
09/08/2017 10:38:36 AM
rw-r--r--
📄
html.py
1.52 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
http.py
96.91 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
http_headers.py
8.04 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
iweb.py
24.97 KB
03/22/2022 11:03:56 AM
rw-r--r--
📄
microdom.py
35.35 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
proxy.py
9.6 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
resource.py
12.8 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
rewrite.py
1.81 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
script.py
5.61 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
server.py
25.86 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
static.py
35.12 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
sux.py
20.4 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
tap.py
8.73 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
template.py
17.14 KB
09/08/2017 10:38:36 AM
rw-r--r--
📁
test
-
03/31/2022 06:22:39 AM
rwxr-xr-x
📄
twcgi.py
11.08 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
util.py
12.12 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
vhost.py
4.36 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
wsgi.py
21.04 KB
09/08/2017 10:38:36 AM
rw-r--r--
📄
xmlrpc.py
19.66 KB
09/08/2017 10:38:36 AM
rw-r--r--
Editing: html.py
Close
# -*- test-case-name: twisted.web.test.test_html -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """I hold HTML generation helpers. """ from twisted.python import log from twisted.python.compat import NativeStringIO as StringIO, escape from twisted.python.deprecate import deprecated from incremental import Version @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def PRE(text): "Wrap <pre> tags around some text and HTML-escape it." return "<pre>"+escape(text)+"</pre>" @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def UL(lst): io = StringIO() io.write("<ul>\n") for el in lst: io.write("<li> %s</li>\n" % el) io.write("</ul>") return io.getvalue() @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def linkList(lst): io = StringIO() io.write("<ul>\n") for hr, el in lst: io.write('<li> <a href="%s">%s</a></li>\n' % (hr, el)) io.write("</ul>") return io.getvalue() @deprecated(Version('Twisted', 15, 3, 0), replacement='twisted.web.template') def output(func, *args, **kw): """output(func, *args, **kw) -> html string Either return the result of a function (which presumably returns an HTML-legal string) or a sparse HTMLized error message and a message in the server log. """ try: return func(*args, **kw) except: log.msg("Error calling %r:" % (func,)) log.err() return PRE("An error occurred.")