wanna apply this title as the title of the website
so, <title>{title}</title>
but " when applied elsewhere translates correctly to " symbol, but when used inside <title>, it doesn't work. title has " and stuff. what's a solution?
just set it as a string with document.title document.title = 'Burning Heart (From "Rocky IV" Soundtrack)'
uhhh i get it from an api they add this " stuff to the title so, should i do .replace().replace() for each stuff, or use something like he, or is there something builtin in javascript? 😅
function htmlDecode(input) { const doc = new DOMParser().parseFromString(input, "text/html"); return doc.documentElement.textContent; }
lil doubt ser will using domparser result in overhead or something? i mean, im just askin 😅
Обсуждают сегодня