mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-10-24 08:33:36 +00:00
9 lines
263 B
TypeScript
9 lines
263 B
TypeScript
// Unescape already encoded/escaped strings
|
|
export function decodeString(stringInput: string): string {
|
|
const parser = new DOMParser();
|
|
const dom = parser.parseFromString(
|
|
'<!doctype html><body>' + stringInput,
|
|
'text/html');
|
|
return dom.body.textContent;
|
|
}
|