Forum Discussion
Anonymous
1 year agoNot applicable
Writing a string to the innerHTML property is insecure
during lint check , when i run pbiviz package shows error like this . also one more error like
Do not access Object.prototype method 'hasOwnProperty' from target object in htmlInjectionUtility.ts
how to solve this
i think error is here
// create 'virtual' HTML, so parsing is easier
const el: HTMLHtmlElement = document.createElement("html");
try {
// tslint:disable-next-line
//eslint-disable-next-line @typescript-eslint/no-non-null-assertion
el.innerHTML = window.atob(payloadBase64);
} catch (err) {
return;
}
No Replies