We are using a 3rd part API that returns HTML as CDATA in XML. I am trying to find out how to display the returned html (there is no webpage which I can simply iframe). Here is the catch: the html includes inline javascript. I have been able to parse out the html just fine and tried displaying it in a lightning component with aura:unescapedHTML, but of course the JS doesn't work. Because the JS is static on each call, would it be possible to store the JS script as a library and use ltng:require?

  • 1
    What if instead of doing this in Aura you use VFPage for this specific usecase. VF page supports inline scripts so that might work and just load the VF page as an iframe in Aura component. Jan 21, 2021 at 5:23
  • I guess that may be the easiest method to solve. Thanks
    – awh01
    Jan 26, 2021 at 18:11


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.