Just one thing that i noted a moment ago - style tag must but closed with matching </style> - if its self enclosed - like <style /> it will break the rendering of note.
So example code should be
<style onload="${postMessageWithResponseTest.replace(/\n/g, ' ')}"></style>
not
<style onload="${postMessageWithResponseTest.replace(/\n/g, ' ')}"/>