I have developed an add-on that adds a tooltip button in webpages for performing a search on social media websites.
Till now I used to have standard text in the button using the following code:
myVariable.innerHTML = "My text";
but I decided to release an updated version that also has localization:
myVariable.innerHTML = browser.i18n.getMessage("myText");
Since introducing the update I get the following warning during verification:
Unsafe assignment to innerHTML
Warning: Due to both security and performance concerns, this may not be set using dynamic values which have not been adequately sanitized. This can lead to security issues or fairly serious performance degradation.
Is there a workaround? Is there a way to eliminate the warning or is it impossible to avoid it?