diff --git a/ui/src/utils/Utilities.tsx b/ui/src/utils/Utilities.tsx index 982284d1..4dbe0be8 100644 --- a/ui/src/utils/Utilities.tsx +++ b/ui/src/utils/Utilities.tsx @@ -157,8 +157,9 @@ export const TITLE_DESCENDING:OrderCriteriaSortingType = { ascending: false } -export const decodeHTMLEntities = (() => { const textArea = document.createElement('textarea'); - return (message: string): string => { - textArea.innerHTML = message; - return textArea.value; - }; })(); +export const decodeHTMLEntities = (html: string): string => { + const textArea = document.createElement('textarea'); + textArea.innerHTML = html; + textArea.remove() + return textArea.value; +}