Expected Behavior
Firefox addons being accepted without warnings around Chart.js.
Current Behavior
Submitting an addon to the Firefox store gives:
⚠ Unsafe assignment to innerHTMLWarning: Due to both security….
When searching through master
, I get one offending line:
Chart.js/src/platforms/platform.dom.js
Lines 187 to 205
in
75aa44e
At first glance this seems to be the same usage in the minified build.
Possible Solution
Unsure, but perhaps there’s another way to do the same thing in that line?
Steps to Reproduce (for bugs)
- Follow the Firefox addon submission wizard for an addon that includes
Chart.min.js
as acontent_script
Context
Reviews of such addons tend to take longer, or the addon might even be rejected based on this.
Environment
- Chart.js version: 2.7.3
- Browser name and version: n/a
- Link to your project: n/a
You could use
document.createElement
,appendChild
, etc. to create the dom structure without usinginnerHTML
. Feel free to send a PR