Remove xhtml-strict and xhtml-transitional, add html (html5)

This commit is contained in:
Stefan Ritter 2011-03-22 22:54:47 +01:00
parent f761993f39
commit c6ad68e0cf

View File

@ -38,7 +38,7 @@ def generate_uuid(string):
return string return string
def errorpage(string): def errorpage(string):
document_header("xhtml-strict") document_header("html")
print "<head>" print "<head>"
print tab + "<title>Error!</title>" print tab + "<title>Error!</title>"
print tab + "<link rel=\"stylesheet\" type=\"text/css\" href=\"error.css\" />" print tab + "<link rel=\"stylesheet\" type=\"text/css\" href=\"error.css\" />"
@ -53,16 +53,9 @@ def errorpage(string):
sys.exit() sys.exit()
def document_header(string): def document_header(string):
if string == "xhtml-transitional": if string == "html":
print "Content-type: text/html\n" print "<!DOCTYPE html>"
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" print "<html>"
print " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
print "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">"
if string == "xhtml-strict":
print "Content-type: text/html\n"
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""
print " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
print "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">"
if string == "atom": if string == "atom":
print "Content-type: application/atom+xml\n" print "Content-type: application/atom+xml\n"
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" print "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
@ -339,7 +332,7 @@ elif feed_display == "rss":
# Generate regular page # Generate regular page
else: else:
document_header("xhtml-strict") document_header("html")
print tab + "<head>" print tab + "<head>"
print tab*2 + "<title>%s</title>" % blog_title print tab*2 + "<title>%s</title>" % blog_title
print tab*2 + "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" print tab*2 + "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />"