[or-cvs] r14551: Another patch by Sebastian Hahn. (check/trunk/cgi-bin)

ioerror at seul.org ioerror at seul.org
Sun May 4 08:43:08 UTC 2008


Author: ioerror
Date: 2008-05-04 04:43:07 -0400 (Sun, 04 May 2008)
New Revision: 14551

Modified:
   check/trunk/cgi-bin/index.py
Log:
Another patch by Sebastian Hahn.


Modified: check/trunk/cgi-bin/index.py
===================================================================
--- check/trunk/cgi-bin/index.py	2008-05-04 08:05:00 UTC (rev 14550)
+++ check/trunk/cgi-bin/index.py	2008-05-04 08:43:07 UTC (rev 14551)
@@ -116,10 +116,16 @@
     req.content_type = 'text/html; charset=utf-8'
 
     # First lets construct the simple webpage:
+    req.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" '\
+    '"http://www.w3.org/TR/REC-html40/loose.dtd">\n')
     req.write('<html>\n')
     req.write('<head>\n')
+    req.write('<meta http-equiv="content-type" content="text/html; '\
+    'charset=utf-8">\n')
     req.write('<title>Are you using Tor?</title>\n')
-    req.write('<style>\n')
+    req.write('<link rel="shortcut icon" type="image/x-icon" '\
+    'href="./favicon.ico">\n')
+    req.write('<style type="text/css">\n')
     req.write('img,acronym {\n')
     req.write('  border: 0;')
     req.write('  text-decoration: none;')
@@ -134,7 +140,8 @@
 
     if UsingTor == 0:
         req.write('\n')
-	req.write('<img src="https://check.torproject.org/tor-on.png">\n<br>')
+	req.write('<img alt="Congratulations. You are using Tor." '\
+	'src="https://check.torproject.org/tor-on.png">\n<br>')
 	req.write('<h1 style="color: #0A0">\n')
 	req.write(_('Congratulations. You are using Tor.'))
 	req.write('<br>\n<br>\n')
@@ -145,7 +152,8 @@
     # This is the case where we have an NXDOMAIN and they aren't using Tor
     elif UsingTor == 1:
         req.write('\n')
-        req.write('<img src="https://check.torproject.org/tor-off.png">\n<br>')
+        req.write('<img alt="Sorry. You are not using Tor." '\
+        'src="https://check.torproject.org/tor-off.png">\n<br>')
         req.write('<h1 style="color: #A00">')
         req.write(_('Sorry. You are not using Tor.'))
 	req.write('<br>\n<br>\n')
@@ -157,7 +165,9 @@
     # It's better that we fail closed and let the user know everything went wrong
     elif UsingTor == 2:
         req.write('\n')
-        req.write('<img src="https://check.torproject.org/tor-off.png">\n<br>')
+        req.write('<img alt="Sorry, your query failed or an unexpected '\
+        'response was received." '\
+        'src="https://check.torproject.org/tor-off.png">\n<br>')
         req.write('<h1 style="color: #A00">\n')
         req.write(_('Sorry, your query failed or an unexpected response was received.'))
 	req.write('<br>\n')
@@ -169,7 +179,7 @@
     req.write('\n')
     req.write('<br>\n');
     req.write('<small>\n')
-    req.write('<p><tt>')
+    req.write('<tt>')
     req.write(_('Additional information: '))
     req.write('<br>\n')
     req.write(_('Your IP address appears to be: '))
@@ -178,7 +188,7 @@
     req.write('<br><br>')
     req.write(_('This server does not log <i>any</i> information about visitors.'))
     req.write('<br>\n<br>\n')
-    #We want to display little pretty images so users can choose their language
+    # We want to display little pretty images so users can choose their language
     locales = getLocales()
 
     for item in sorted(locales.keys()):
@@ -188,7 +198,7 @@
         req.write('alt="%s" width="24" height="16">' % item )
         req.write('</acronym>')
         req.write('</a> ')
-    req.write('</tt></p>')
+    req.write('</tt>')
     req.write('</small>')
     req.write('</center>\n')
     req.write('</body>')



More information about the tor-commits mailing list