diff options
author | Stefan Ritter <xeno@thehappy.de> | 2011-03-22 23:18:16 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2011-03-22 23:18:16 +0100 |
commit | 0f4dabc2dd43c99f427e3eee743bdb8155e08cf3 (patch) | |
tree | 994e58333eddbf942f1fc58b78985a680e332324 | |
parent | bf758a26acee8e5063cbe19182370bf1546edd6e (diff) |
language and tabs:
* Use en as language when language is not declared
* Use one space instead of one tab
Diffstat (limited to '')
-rwxr-xr-x | blogthon.cgi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 264cd54..a8e05df 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -30,7 +30,7 @@ no_break = re.compile("^\s*(<ul|</ul>|<li|</li>|<ol|</ol>|<table|</table>|<tr|</ line_start_hyphen = re.compile("^-.*$") line_start_plus = re.compile("^\+.*$") -tab = "\t" +tab = " " def generate_uuid(string): string_md5sum = md5(string).hexdigest() @@ -56,7 +56,10 @@ def document_header(string): if string == "html": print "Content-type: text/html\n" print "<!DOCTYPE html>" - print "<html lang=\"" + language + "\">" + try: + print "<html lang=\"" + language + "\">" + except NameError: + print "<html lang=\"en\">" if string == "atom": print "Content-type: application/atom+xml\n" print "<?xml version=\"1.0\" encoding=\"utf-8\"?>" |