VIP-Coding-Standards
VIP-Coding-Standards copied to clipboard
HTMLExecutingFunctionsSniff: Add more unsafe functions to $HTMLExecutingFunctions
trafficstars
Describe the solution you'd like
We should add to the $HTMLExecutingFunctions property the following functions:
- insertAdjacentHTML
- outerHTML
What code should be reported as a violation?
(function(){
divElem.outerHTML = "<div>Hello " + userControlledVal + "</div>"; // Warning.
divElem.insertAdjacentHTML("","<b>"+ userControlledVal + "</b>"); // Warning.
})();
Additional context
http://blog.blueclosure.com/2017/09/