Inline Bots: Fix query parsing on Windows (#2204)

This commit is contained in:
Alexander Zinchuk 2022-12-15 19:19:14 +01:00
parent 569000250f
commit 88234a64dc

View File

@ -103,5 +103,11 @@ function parseBotQuery(html: string) {
function getPlainText(html: string) {
tempEl.innerHTML = html.replace(/<br>/g, '\n');
tempEl.querySelectorAll<HTMLElement>('[alt]').forEach((el) => {
if (!el.innerText) {
el.innerText = el.getAttribute('alt')!;
}
});
return tempEl.innerText;
}