lib/taskjuggler/HTMLDocument.rb in taskjuggler-3.3.0 vs lib/taskjuggler/HTMLDocument.rb in taskjuggler-3.4.0

- old
+ new

@@ -58,11 +58,11 @@ attrs['xmlns'] ='http://www.w3.org/1999/xhtml' unless docType == :html5 @elements << (@html = HTML.new(attrs)) end # Generate the 'head' section of an HTML page. - def generateHead(title, metaTags = {}) + def generateHead(title, metaTags = {}, blob = nil) @html << HEAD.new { e = [ TITLE.new { title }, META.new({ 'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=utf-8' }), @@ -71,9 +71,11 @@ ] # Include optional meta tags. metaTags.each do |name, content| e << META.new({ 'name' => name, 'content' => content }) end + # Add a raw HTML blob into the header if provided. + e << XMLBlob.new(blob) if blob e } end