In JavaScript, how can I convert a string containing HTML entities to uppercase. Take the string 'Cafés & Bars' for example:
Cafés & Bars
It needs to be converted to:
CAFÉS & BARS
If toUpperCase()
were used, it would destroy both the entities. If the text were to be uppercased and then text between &
and ;
were lowercased then the acute E would remain lowercase.
In my particular case, I am unable to solve this using the text-transform: uppercase
style.