Google Chrome Fails to Render PNG Graphics Embedded in MIME HTML Files

538 views
Skip to first unread message

Donald Macnaughton

unread,
Jul 15, 2014, 2:21:20 PM7/15/14
to chromium...@chromium.org

I reported this issue to the Google Chrome Help Forum and I also submitted it on the "Report an issue" button on the Chrome About page.

I’m generating output from statistical software that contains many statistical graphs (in PNG format) and also contains wide tables). It is convenient to put this output in an HTML file (as opposed to PDF) because HTML in a browser efficiently handles the wide tables (without vertically splitting then) using the horizontal scrollbar. And HTML can also readily render the PNG graphs. 

It’s convenient for recipients of my documents if all the graphics files are packaged with the text in a single MIME HTML file (so that users don’t have to deal with the many loose PNG files). Until sometime before July 1, 2014 Chrome would render my MIME HTML files properly. However, now Chrome properly renders the text and tables in the files, but it fails to render the PNG graphs, and instead only shows a frame in which the graph should appear. I've attached a small MIME HTML file (Pr0569.mht) that illustrates the problem. This graph in the file renders properly in Internet Explorer (IE), but the graph does not render properly in Chrome. 

If after attempting to view the file in Chrome I select Chrome menu, Tools, JavaScript Console, I see that the embedded graph generated the following messages: 

Blocked script execution in 'file:///C:/Users/Don/Documents/Pr0569.mht' because the document's frame is sandboxed and the 'allow-scripts' permission is not set. PR0569.MHT:12

Blocked script execution in 'file:///C:/Users/Don/Documents/Pr0569.mht' because the document's frame is sandboxed and the 'allow-scripts' permission is not set. PR0569.MHT:1600

Blocked script execution in 'file:///C:/Users/Don/Documents/Pr0569.mht' because the document's frame is sandboxed and the 'allow-scripts' permission is not set. PR0569.MHT:1

Not allowed to load local resource: file:///C:/progs/SGPlot1.png Pr0569.mht:1631.

The error messages suggest that I can eliminate the problem by setting the ‘allow-scripts’ permission. However, if I select Chrome menu, Settings, Show advanced settings, Privacy, Content settings, JavaScript, I see that “Allow all sites to run JavaScript” is enabled. Is there some other permission I can set that will allow the PNG graphs in a MIME HTML file to be rendered? 

I can think of six possible causes of this problem: 

  • It may be the case that there is some permission that I can set in Chrome that will allow the graphs to be rendered, as discussed in the preceding paragraph. 
  • It may be the case that Chrome has a bug that prevents it from properly rendering the graphs. For example, instead of trying to read the PNG file from inside the MIME HTML file, perhaps Chrome is trying to go out to the disk to get the PNG file in its original location, but that’s being blocked by the sandboxing function in Chrome. 
  • It may be the case that Chrome will no longer render PNG files embedded within a MIME HTML file in order to protect against certain malware exploits. In this case, there may be no way for me to get Chrome to render PNG graphs embedded in MIME HTML files. 
  • I created the MIME HTML file with the “Save As Web Archive” function in IE. It may be the case that IE creates MIME HTML files that do not satisfy the MIME HTML standard and therefore Chrome has not rendered the graphics. Thus I might be able to use another application to generate the MIME HTML file and then Chrome would correctly render the PNG graphs. 
  • It may be the case that the software that originally generated the HTML file with the loose PNG graph (i.e., SAS statistical software) did not generate an appropriate HTML file and therefore Chrome will not render it (even though IE will properly render it). (Chrome will properly render the graph if I point it at the original HTML file instead of pointing it at the MIME HTML file). 
  • Other. 

What do you think is the cause of my problem? Can you suggest a solution that will allow me to continue provide a simple way for readers to properly view my statistical software output files, even if a user wishes to use Chrome? 

Thanks for your help, 

Don Macnaughton

Pr0569.mht
Reply all
Reply to author
Forward
0 new messages