Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 422 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 422 Bytes

Sanitize mail

A sanitize-html wrapper optimised for sanitising HTML for email clients

Installation

NPM

    npm i --save sanitize-mail

Yarn

    yarn add sanitize-mail

Usage

Node

  const sanitizeMail = require('sanitize-mail');

  let html = '<h1>Hello world</h1><canvas></canvas>';
  let clean = sanitizeMail(html);

  console.log(clean); // Will output without canvas element