Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fast and easy html code cleaning using DOM
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
purgatory.js

README.md

purgatory

Easy html cleaning

Example

var crappyHtml = '<div nonsense="10"><p><p></span>Yo!</blalba></div></p>';
var niceHtml = purgatory(crappyHtml, {
  allow: 'h1,h2,h3,h4,h5,h6,p,img[src alt]'
});

// niceHtml = '<p>Yo!</p>';

Documentation

Todo

Something went wrong with that request. Please try again.