Skip to content

Commit

Permalink
Bug #650139: Fix missing doctype preventing HTML 4.01 transitional va…
Browse files Browse the repository at this point in the history
…lidation

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

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20639 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
cstim committed May 13, 2011
1 parent e73c69f commit e93c103
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/report/report-system/html-document.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e93c103

Please sign in to comment.