MCPcopy
hub / github.com/nuxt/nuxt / sanitiseHTML

Function sanitiseHTML

test/basic.test.ts:1429–1429  ·  view source on GitHub ↗
(html: string)

Source from the content-addressed store, hash-verified

1427 await $fetch<string>('/use-id')
1428
1429 const sanitiseHTML = (html: string) => html.replace(/ data-[^= ]+="[^"]+"/g, '').replace(/<!--[[\]]-->/, '')
1430
1431 const serverHTML = await $fetch<string>('/use-id').then(html => sanitiseHTML(html.match(/<form.*<\/form>/)![0]))
1432 const ids = serverHTML.match(/id="[^"]*"/g)?.map(id => id.replace(/id="([^"]*)"/, '$1')) as string[]

Callers 1

basic.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…