fixes jenkinsci/htmlpublisher-plugin#8 and related JENKINS-5682/11689