Hello friends, In this tutorial, we are going learn aura:unescapedHtml In Lightning Component. This is a very useful pre-built component which is used to render pre-formatted HTML
aura:unescapedHtml In Lightning Component Salesforce
aura:unescapedHtml is used to render pre-formatted HTML. The value assigned to this component will be rendered without modifying its content. For Example, sometimes you need to render HTML content that is generated on the server side and add it to dom. You must escape any HTML if necessary or your app might be exposed to security vulnerabilities.
The syntax for defining aura:unescapedHTML
To avoid XSS vulnerability you must sanitize value which you are going to assign this component.
Let’s see an example :
Step 1: Login to your Salesforce account and Open Developer Console.
Step 2: Create a Lightning Component called LightningQuickActionExample. Write the following code in:
UnescapedHTML.cmp:
UnescapedHTML.css
UNEScapedHTML.Controller.Js
TEST THE COMPONENT.
Create a New Lightning Application and replace the following code.
Output:
View More:
- Select Multiple values using lightning:dualListbox in Lightning Component Salesforce.
- Attribute in Lightning Component
- How to dynamically bind picklist field value in Lightning Component
- What is Trigger Factory in Salesforce?.
Conclusion:
I hope you would love this post. Please don’t hesitate to comment for any technical help. Your feedback and suggestions are important to us.
Thank you.
best drugstore bronzer us online pharmacy uk pharmacy
rx pharmacy online pharmacy express online pharmacy drugstore
online canadian pharmacy erectile dysfunction online canadian pharmacy
cheap erectile dysfunction pills online best online canadian pharmacy online pharmacy drugstore
best drugstore highlighter peoples pharmacy best drugstore primer
canadian mail order pharmacy http://pharmacy-onlineasxs.com/ canadian pharmacy viagra
ed meds california pharmacy 24 hours pharmacy