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

onclick-button not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • htmlpublisher-plugin
    • None
    • Jenkins 1.652
      htmlpuplisher 1.11
      Chrome

      I got a html-report with a button to hide and show detailed information via onClick.
      If i open the report via the plugin, that button never works. It doesnt react.

      If i open the report from the build archiv it works.
      Its not related to the Content Security Policy. Even if i set the CSP to "", the button doesnt work in the puplisher.
      It looks like its related to the CSP. If i change the CSP on the run the behavior of the archiv-file changes too.
      But not for the reported file. Its behavior stays like the CSP was configured in the moment of puplishing. So its behavior will never change afterwards.

      <head>
        <body>
          <table border='2' cellspacing='1'>
            <tr>
              <th>h1</th>
              <th>h2</th>
            </tr>
            <tr>
              <td valign='top'>Row 1</td>
              <td bgcolor='1BD130' valign='top'>Text<br>IMPORTANT<BR><button style="background-color:1BD130;border-style:solid;border-color:grey" onclick="if (document.all.bid1.style.display=='') { document.all.bid1.style.display='none' } else { document.all.bid1.style.display=''}">Log:</button><div id="bid1" style="display:none;">Details</div></td>
      	  </tr>
      	</table>
        </body>
      </head>
      

            r2b2_nz Richard Bywater
            stautz85 Sebastian
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: