@dispatch will request serialize text in an odd manner in Salesforce.
In the Salesforce string, if the content is: '<a href="">Things</a>'
In Angular, you will see that you've received: <a href="$quot;>Things<a>
Want to learn Salesforce from basics! Here's the right video for you on Salesforce provided by Intellipaat:
The solution I found is as follows which you can change in your controller:
function to_trusted(html_code) {
// Cause the <g; etc become '<'
return $('<textarea />').html(html_code).text();
}
I hope it works for you!
Want to learn Salesforce in depth? Go through the Salesforce Training provided by Intellipaat!