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 page. 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
    is there another callout that can just get you the data that you need? Then you can create a custom page with the proper data elements. Otherwise, why is there an api necessary if it is just returning a webpage? Why not just use an iframe and set the src to the url?
    – willard
    Dec 24, 2020 at 19:52
  • Within the callout it also has the data, but I was hoping to find a way around parsing through all of it and finding a similar way to display it all based on the html they have already constructed. It is not returning a web page, it is just returning html, so there is no corresponding URL for it.
    – awh01
    Dec 27, 2020 at 17:39


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.