Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39866

SVG images not shown with Internet Explorer using HTML Publisher Plugin

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Minor Minor
    • htmlpublisher-plugin
    • None
    • Jenkins 2.31
      HTML Publisher Plugin 1.11
      Internet Explorer

      In pages generated by the HTML Publisher Plugin (version 1.11) embedded SVG images are not shown correctly if opened in Internet Explorer (11). If opened with Firefox, they are displayed.

      The reason for this is described at StackOverflow: http://stackoverflow.com/a/27494616

      It sounds as though you're not in a modern document mode. Internet Explorer 11 shows the SVG just fine when you're in Standards Mode. Make sure that if you have an x-ua-compatible meta tag, you have it set to Edge, rather than an earlier mode.

      <meta http-equiv="X-UA-Compatible" content="IE=edge">
      

      It does not help to add this to the generated HTML file because it is shown as frame within a page generated by the HTML Publisher Plugin. It works, if just the embedded frame is shown.

      A possible solution would be to add the line above to the page source code, which is used for the page embedding the actual generated page (i. e. https://github.com/jenkinsci/htmlpublisher-plugin/blob/73fdcc6e0a668d27bc390567f95cc8c9ec445cc1/src/main/resources/htmlpublisher/HtmlPublisher/header.html)

      A more general solution would be to allow to modify this file by options given to the plugin.

          [JENKINS-39866] SVG images not shown with Internet Explorer using HTML Publisher Plugin

          mcrooney added a comment -

          Makes sense, thanks for the report! Instead of trying to create options for each little thing (doctype, lang, encoding, etc), what do you think about adding an option to specify a location for a custom template or header/footer?

          mcrooney added a comment - Makes sense, thanks for the report! Instead of trying to create options for each little thing (doctype, lang, encoding, etc), what do you think about adding an option to specify a location for a custom template or header/footer?

          Joachim Herb added a comment - - edited

          Of course, a template directory would be also OK. Perhaps this could be a starting point: https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin

          Actually I just found out, that for "normal" Jenkins pages I can modify the header with this userContent/title.js Javascript script:

          metaContent = document.createElement("meta");
          metaContent.setAttribute("content", "IE=edge");
          metaContent.setAttribute("http-equiv", "X-UA-Compatible");
          
          document.head.appendChild(metaContent);
          

          Unfortunately, the HTML Publisher Plugin generated HTML pages are not modified by the Simple Theme Plugin.

          Just another remark: It is probably too late to modify the header using Javascript, after the page was already loaded?!? At least, it does not help to add the meta tag to the header with the developer tools of Internet Explorer.

          Joachim Herb added a comment - - edited Of course, a template directory would be also OK. Perhaps this could be a starting point: https://wiki.jenkins-ci.org/display/JENKINS/Simple+Theme+Plugin Actually I just found out, that for "normal" Jenkins pages I can modify the header with this userContent/title.js Javascript script: metaContent = document.createElement( "meta" ); metaContent.setAttribute( "content" , "IE=edge" ); metaContent.setAttribute( "http-equiv" , "X-UA-Compatible" ); document.head.appendChild(metaContent); Unfortunately, the HTML Publisher Plugin generated HTML pages are not modified by the Simple Theme Plugin. Just another remark: It is probably too late to modify the header using Javascript, after the page was already loaded?!? At least, it does not help to add the meta tag to the header with the developer tools of Internet Explorer.

          Hi - this issue has been around and not touched for a year or more. In an effort to try and focus on issues which are still present, I am resolving these issues for now.

          If you feel that the issue is still present, please feel free to re-open / comment. I'll be closing off any issues that haven't had any re-opening or comments by the end of the month.

          Thanks for reporting these issues - hopefully you are still using HTML Publisher and its working for you but, if not, let me know so that I can focus on issues that are causing you problems today

          Richard Bywater added a comment - Hi - this issue has been around and not touched for a year or more. In an effort to try and focus on issues which are still present, I am resolving these issues for now. If you feel that the issue is still present, please feel free to re-open / comment. I'll be closing off any issues that haven't had any re-opening or comments by the end of the month. Thanks for reporting these issues - hopefully you are still using HTML Publisher and its working for you but, if not, let me know so that I can focus on issues that are causing you problems today

            r2b2_nz Richard Bywater
            jherb Joachim Herb
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: