Hello everyoane
I have a problem with exercise about convert HTML entities.
This is my code:
function convertHTML(str) {
let entities = {
"&": '&',
"<": "<",
">": ">",
"'": '&​apos;',
'\"': '&​quot;'
}
let regExp = /[^\w\s]/g
return str.replace(regExp, function (match) {
return entities[match]
})
}
convertHTML('Stuff in "quotation marks"')
everything works perfect in Visual Studio Code and Chrome Console on FCC page, but i can’t set the exercise conditions with 'Stuff in “quotation marks” ’ and “Schindler’s List” as true
code from Get a Hint page works ok but i can’t understand why, on first look code do the same things