{"meta":{"name":"FindSoftware","page":"https://findsoftware.frbit.cloud/sanitize-html/","markdown":"https://findsoftware.frbit.cloud/sanitize-html.md","license":"https://creativecommons.org/licenses/by/4.0/","attribution":"FindSoftware, CC BY 4.0","note":"Attributes are recorded, never scored. An absent field means unknown, never zero and never bad."},"record":{"id":"sanitize-html","name":"sanitize-html","urls":{"repository":"https://github.com/apostrophecms/apostrophe","docs":"https://github.com/apostrophecms/apostrophe/tree/main/packages/sanitize-html#readme"},"category":["library"],"description":"JavaScript library that cleans user-submitted HTML, keeping allowlisted elements and attributes and discarding the rest.","maintainer":"P'unk Avenue LLC","maintainerType":"company","firstRelease":2013,"hosting":["node"],"language":"javascript","runtime":["node"],"runtimeMin":"node 22","contentStore":null,"databases":null,"adminUi":null,"headlessApi":null,"templating":null,"i18n":null,"runsAs":null,"renderingModes":null,"installMethod":"npm","licenseModel":"open-source","license":"MIT","currentMajor":"2","latestReleaseDate":"2026-11-11T00:00:00.000Z","githubStargazers":4669,"contributors":101,"packagistDownloads":null,"npmWeeklyDownloads":18174490,"dependentRepos":89985,"dependentPackages":1495,"checkedAt":"2026-11-16T00:00:00.000Z","addedAt":"2026-11-16T00:00:00.000Z","sources":[{"field":"urls","url":"https://api.github.com/repos/apostrophecms/apostrophe","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"urls","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/README.md","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"maintainer","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/LICENSE","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"language","url":"https://api.github.com/repos/apostrophecms/apostrophe","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"category","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/README.md","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"runtime","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/README.md","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"runtimeMin","url":"https://registry.npmjs.org/sanitize-html/latest","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"installMethod","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/README.md","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"license","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/package.json","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"licenseModel","url":"https://raw.githubusercontent.com/apostrophecms/apostrophe/main/packages/sanitize-html/package.json","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"firstRelease","url":"https://registry.npmjs.org/sanitize-html","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"currentMajor","url":"https://api.github.com/repos/apostrophecms/apostrophe/tags","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"latestReleaseDate","url":"https://registry.npmjs.org/sanitize-html","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"githubStargazers","url":"https://api.github.com/repos/apostrophecms/apostrophe","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"contributors","url":"https://api.github.com/repos/apostrophecms/apostrophe/contributors?per_page=1","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"npmWeeklyDownloads","url":"https://api.npmjs.org/downloads/range/2026-11-01:2026-11-07/sanitize-html","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"dependentPackages","url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/sanitize-html","checkedAt":"2026-11-16T00:00:00.000Z"},{"field":"dependentRepos","url":"https://packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/sanitize-html","checkedAt":"2026-11-16T00:00:00.000Z"}],"status":"active","ai":"authored"},"prose":"sanitize-html is a JavaScript library that cleans user-submitted HTML. A caller lists the tags and the attributes per tag to permit, and the library discards the rest. The README names HTML from rich text editors, including CSS pasted from Word, as typical input.\n\nThe 2.x line no longer ships a build for the browser, so browser use means including the package in the project's own bundle.\n\n## Worth knowing\n\nThe standalone repository is archived and points to the monorepo, where the package sits in its packages/sanitize-html directory. The README's Node.js support statement is older than the requirement in the published package."}