I have a flow that is using a simple DisplayText element on the Screen. It just displays Hello world (yes, I formatted it to be bold). I edited the record detail page and added this flow to the page. On the record detail page it shows correctly.

On another page, where I used a lightning Out container app, and embedded this flow using an aura component, the displayText element on the flow does not show up correctly. It renders the html with escaped characters. So on the browser, I see <p><b>Hello World</b></p>.

This is how I am dynamically creating the component

              .then(function() {
                var attributes = {};
                  $Lightning.createComponent('c:myComponent', attributes, 'my-container')
                  .then(function(component) {
                    // tear down the component on destroying scope.
                  .catch(function(e) {
                    console.error('Failed to create component', e);

LightningOutContainerApp is my aura app. my-container is the dom node, where I want the component to be attached to. Code simplified for brevity.

<aura:application access="GLOBAL" extends="ltng:outApp">
  <aura:dependency resource="c:myComponent" type="COMPONENT"/>

Reference: How to embed a flow in an aura component: https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_distribute_internal_lc.htm

  • Turns that, this happens only on certain salesforce orgs. I am still figuring out if there might be a setting in Security or Session that is affecting the sanitization of html. – Amudh Feb 6 '20 at 0:02

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.