I am getting a data from an API to my JS project. Data is about questions and answers. Texts in data are broken. Sometimes there are special characters in questions or answers.
For Expample :
Question : Which song in rapper Kanye West's album "The Life of Pablo" features Rihanna?
Following special characters are characters I've been able to catch so far. So maybe there is more in API data.
°
"
°
'
ö
’
é
The solutions that I've found on the internet was only focusing specific special character and solving it with .replace() function.
I want to ask you "Can you write the following function in JavaScript?"
function fixText(text){
text = text.......??????
return text
}