AUDIT: r20639 - gnucash/trunk/src/report/report-system - Bug #650139: Fix missing doctype preventing HTML 4.01 transitional validation

Christian Stimming cstim at code.gnucash.org
Fri May 13 16:17:51 EDT 2011


Author: cstim
Date: 2011-05-13 16:17:50 -0400 (Fri, 13 May 2011)
New Revision: 20639
Trac: http://svn.gnucash.org/trac/changeset/20639

Modified:
   gnucash/trunk/src/report/report-system/html-document.scm
Log:
Bug #650139: Fix missing doctype preventing HTML 4.01 transitional validation

Patch by "Bert":

This patch fixes part of the missing doctype for most reports through
html-document.scm

Exported reports lack a document type, preventing HTML validation.

When exporting this may lead browsers to incorrectly read the reports generated
by GnuCash.

The attached patch aims for HTML 4.01 transitional validation of reports in the
long term and thus adds this doctype on top of the reports. While it is far
from perfect, 4.01 Trans looks like a good first target and can be read by most
(including older) browsers.

BP

Modified: gnucash/trunk/src/report/report-system/html-document.scm
===================================================================
--- gnucash/trunk/src/report/report-system/html-document.scm	2011-05-13 20:17:38 UTC (rev 20638)
+++ gnucash/trunk/src/report/report-system/html-document.scm	2011-05-13 20:17:50 UTC (rev 20639)
@@ -153,6 +153,11 @@
               (gnc:report-render-starting (gnc:html-document-title doc)))
           (if (not (null? headers?))
               (begin 
+                ;;This is the only place where <html> appears
+                ;;with the exception of 2 reports: 
+                ;;./share/gnucash/guile-modules/gnucash/report/taxinvoice.eguile.scm:<html>
+                ;;./share/gnucash/guile-modules/gnucash/report/balsheet-eg.eguile.scm:<html>
+                (push "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \n\"http://www.w3.org/TR/html4/loose.dtd\">") ;;trying 4.01 Trans
                 (push "<html>\n")
                 (push "<head>\n")
                 (push "<meta http-equiv=\"content-type\" content=\"text-html; charset=utf-8\">\n")



More information about the gnucash-changes mailing list