title: Jenkins HTML Publisher Plugin: No external links with Jenkins 1.643
body: <p>I have a Jenkins job, where I generate an HTML-Page as a post buildstep, containing an image link ( HTML img tag). This HTML page is published by the HTMLPublisher Plugin for each job.</p>
  
  <p>This has always worked great. But since I have updated Jenkins to v. 1.643, I only see a blank page when I click the published HTML page.</p>
  
  <p>I've tried out a lot of things and found out the following strange behaviour:
  Since the update, I cannot embed external links into the HTML-pages I publish. 
  If I embed an image from an external location (img src="somelocation/xxx.jpg), the image won't be displayed.</p>
  
  <p>If I examine the HTML page with Firefox, I can see that the image tag is greyed out like it was invisible, but it is not.</p>
  
  <p>If I embed a normal hyperlink, pointing to an external location, I can see the link in the displayed page, but when I click on it, nothing happens.</p>
  
  <p>It is like Jenkins would not permit external links in this context.</p>
  
  <p>Please help me out here :)</p>
  
  <p>Thank you!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Thanks to Dave Bacher, he gave me the right hint.
  Look at this page to see Jenkins' new security policy.</p>
  
  <p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy#ConfiguringContentSecurityPolicy-Implementation" rel="noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy#ConfiguringContentSecurityPolicy-Implementation</a></p>
  
  <p>You have to relax the rules, so that embedding external images is allowed again.</p>
  
  <p>For testing it, just type the following in your script console:</p>
  
  <pre><code>System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox; img-src *;")
  </code></pre>
  
  <p>This will allow embedding images from any external website.</p>
  
  <p>If you run Jenkins on Ubuntu and you want to set this permanently, just edit the file /etc/default/jenkins. Under <em># arguments to pass to java</em> add the following line:</p>
  
  <pre><code>JAVA_ARGS="-Dhudson.model.DirectoryBrowserSupport.CSP=\"sandbox; img-src *;\""
  </code></pre>