Похожие чаты

Bros Lil doubt let title = "Burning Heart (From "Rocky IV" Soundtrack)" i

wanna apply this title as the title of the website
so, <title>{title}</title>

but &quot; when applied elsewhere translates correctly to " symbol, but when used inside <title>, it doesn't work. title has &quot; and stuff. what's a solution?

4 ответов

4 просмотра

just set it as a string with document.title document.title = 'Burning Heart (From "Rocky IV" Soundtrack)'

theo- Автор вопроса
David
just set it as a string with document.title docum...

uhhh i get it from an api they add this &quot; 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? 😅

theo
uhhh i get it from an api they add this &quot; stu...

function htmlDecode(input) { const doc = new DOMParser().parseFromString(input, "text/html"); return doc.documentElement.textContent; }

theo- Автор вопроса
David
function htmlDecode(input) { const doc = new DOM...

lil doubt ser will using domparser result in overhead or something? i mean, im just askin 😅

Похожие вопросы

Обсуждают сегодня

Карта сайта