80c868aefe
fix #1285
9 lines
245 B
TypeScript
9 lines
245 B
TypeScript
/* eslint-disable no-restricted-globals */
|
|
|
|
let decoder: HTMLDivElement
|
|
|
|
export function decodeHtmlBrowser(raw: string): string {
|
|
;(decoder || (decoder = document.createElement('div'))).innerHTML = raw
|
|
return decoder.textContent as string
|
|
}
|