innerHTML could be unsafe. Could you append the icon and the text separately in this case. Text should be added wrapped into a textNode.