Need some help with angular innerHTML and writing json data from server to HTML.
I have json with string like:
'<!DOCTYPE root [<!ENTITY % ext SYSTEM > %ext;]><br /><authorizationRequest login="1" password="1"></authorizationRequest>'
I'm trying to get in on HTML like:
[innerHTML]="selectedTask.description | safeHtml"
And have a pipe like:
constructor(private _sanitizer: DomSanitizer){}
transform(html) {
console.log(html)
return this._sanitizer.bypassSecurityTrustHtml(html);
}
And this trick does smth like:
'ext;]'
How can i have full safe string from json and write it in HTML