I am trying to add ® sign to my string. How do I get it to recognize the @reg; as a symbol in my string?
"MyCompany® Official Site"
>Solution :
You’ll need to use a DOMParser to decode the entity by parsing it as HTML:
const res = new DOMParser().parseFromString(`MyCompany® Official Site`, 'text/html').body.textContent
console.log(res)