class TextUtils {
static decodeHTML(text: string): string {
return text;
const textArea = document.createElement('textarea');
textArea.innerHTML = text;
return textArea.value;
}
static encodeHTML(text: string): string {
return text;
const textArea = document.createElement('textarea');
textArea.innerText = text;
return textArea.innerHTML;
}
}