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:





Create a New Lightning Application and replace the following code.



View More:


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.

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, bool given in C:\inetpub\vhosts\debugonweb.com\httpdocs\wp-includes\wp-db.php on line 3353