tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

fenced-frame.sub.py (819B)


      1 # Fenced frame HTML body. Generated by a Python file to avoid having quotes in
      2 # the injected script escaped, which the test server does to *.html files.
      3 def main(request, response):
      4    response.status = (200, b"OK")
      5    response.headers.set(b"Content-Type", b"text/html")
      6    response.headers.set(b"Supports-Loading-Mode", b"fenced-frame")
      7 
      8    return """
      9        <!DOCTYPE html>
     10        <html>
     11        <head>
     12        <!--- Allow injected scripts to use functions in fledge-util.sub.js --->
     13        <base href="..">
     14        <script src="/resources/testharness.js"></script>
     15        <script src="/common/utils.js"></script>
     16        <script src="resources/fledge-util.sub.js"></script>
     17        </head>
     18        <body>
     19        <script>
     20        {{GET[script]}}
     21        </script>
     22        </body>
     23        </html>
     24     """