diff --git a/packages/nuxt/src/app/components/utils.ts b/packages/nuxt/src/app/components/utils.ts index 11108cb583..1411c2c329 100644 --- a/packages/nuxt/src/app/components/utils.ts +++ b/packages/nuxt/src/app/components/utils.ts @@ -75,24 +75,6 @@ export function createBuffer () { } } -const TRANSLATE_RE = /&(nbsp|amp|quot|lt|gt);/g -const NUMSTR_RE = /&#(\d+);/gi -export function decodeHtmlEntities (html: string) { - const translateDict = { - nbsp: ' ', - amp: '&', - quot: '"', - lt: '<', - gt: '>' - } as const - return html.replace(TRANSLATE_RE, function (_, entity: keyof typeof translateDict) { - return translateDict[entity] - }).replace(NUMSTR_RE, function (_, numStr: string) { - const num = parseInt(numStr, 10) - return String.fromCharCode(num) - }) -} - /** * helper for NuxtIsland to generate a correct array for scoped data */