InnerHTML here is most likely safe and wouldn't cause any security issues, but it should be a last resort. Maybe try and find an alternative like appending an img element to the button instead?
I found online a way to do it using CSS and giving the button a background
Link here!
https://github.com/fac-14/teamcoolerweek-2/blob/4b588fb49da82ef7d3bdaea8458d8c7c54c80362/dom.js#L29
InnerHTML here is most likely safe and wouldn't cause any security issues, but it should be a last resort. Maybe try and find an alternative like appending an img element to the button instead?
I found online a way to do it using CSS and giving the button a background Link here!