[Buildbot-commits] buildbot/buildbot/status html.py,1.73,1.74 classic.css,1.2,1.3

Brian Warner warner at users.sourceforge.net
Sun Oct 23 05:48:19 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9744/buildbot/status

Modified Files:
	html.py classic.css 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-364
Creator:  Brian Warner <warner at lothar.com>

emit-valid-HTML patch, thanks to Brad Hards

	* buildbot/status/html.py (HtmlResource): incorporate valid-HTML
	patch from Brad Hards
	* buildbot/status/classic.css: same


Index: classic.css
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/classic.css,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- classic.css	23 Oct 2005 05:16:57 -0000	1.2
+++ classic.css	23 Oct 2005 05:48:17 -0000	1.3
@@ -29,7 +29,7 @@
 	background-color: red;
 }
 .warnings {
-	background-color: orange;
+	background-color: #ff8000;
 }
 .exception {
 	background-color: #c000c0;

Index: html.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- html.py	23 Oct 2005 05:16:57 -0000	1.73
+++ html.py	23 Oct 2005 05:48:17 -0000	1.74
@@ -142,7 +142,7 @@
 
 class HtmlResource(Resource):
     css = None
-    contentType = "text/html"
+    contentType = "text/html; charset=UTF-8"
     def render(self, request):
         data = self.content(request)
         request.setHeader("content-type", self.contentType)
@@ -152,14 +152,22 @@
         return data
     title = "Dummy"
     def content(self, request):
-        data = "<html>\n<head><title>" + self.title + "</title></head>\n"
+        data = ('<!DOCTYPE html PUBLIC'
+                ' "-//W3C//DTD XHTML 1.0 Transitional//EN"\n'
+                '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n'
+                '<html'
+                ' xmlns="http://www.w3.org/1999/xhtml"'
+                ' lang="en"'
+                ' xml:lang="en">\n')
+        data += "<head>\n"
+        data += "  <title>" + self.title + "</title>\n"
         if self.css:
             # TODO: use some sort of relative link up to the root page, so
             # this css can be used from child pages too
-            data += ("<link href=\"%s\""
-                     " rel=\"stylesheet\""
-                     " type=\"text/css\">\n" % "buildbot.css")
-        data += "<body vlink=\"#800080\">\n"
+            data += ('  <link href="%s" rel="stylesheet" type="text/css"/>\n'
+                     % "buildbot.css")
+        data += "</head>\n"
+        data += '<body vlink="#800080">\n'
         data += self.body(request)
         data += "</body></html>\n"
         return data





More information about the Commits mailing list