jill64 / svelte-sanitize

πŸ’Ž Safe html expansion for Svelte with universal-sanitize

Home Page:https://svelte-sanitize.jill64.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@jill64/svelte-sanitize

npm-version npm-license npm-download-month npm-min-size ci.yml website

πŸ’Ž Safe html expansion for Svelte with universal-sanitize

Installation

npm i @jill64/svelte-sanitize

If you have problems building with pnpm, try the following

pnpm i -D @jill64/universal-sanitizer

Usage

<script>
  import { Render } from '@jill64/svelte-sanitize'
</script>

<Render
  html={/* dirty html */}
  options={/* {
    sanitizeHtml?: sanitize-html options
    dompurify?: DOMPurify options
  } */}
/>

Same as all parameters @jill64/universal-sanitize

License

MIT

About

πŸ’Ž Safe html expansion for Svelte with universal-sanitize

https://svelte-sanitize.jill64.dev

License:MIT License


Languages

Language:TypeScript 48.0%Language:Svelte 31.4%Language:JavaScript 13.0%Language:HTML 7.7%