Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

htmltidy

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmltidy

tidy bad html

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

HTML Tidy

Node Wrapper for HTML Tidy

What is HTML Tidy?

HTML Tidy is an open source program for checking and generating clean XHTML/HTML. It cleans up coding errors in HTML files and fixes bad formatting. It can output files in the HTML, XHTML or XML file format.

Using HTML Tidy, developers can programatically clean up and fix poorly-written HTML pages. Another use is to convert HTML to XHTML or XML. These files can then be easily processed using the tools in the traditional XML chain, such as XSL transforms.

Installation

To use this library simply install it using npm:

npm install htmltidy

Example

var tidy = require('htmltidy').tidy;
tidy('<table><tr><td>badly formatted html</tr>', function(err, html) { 
    console.log(html); 
});

API

htmltidy.tidy(text, [options], callback)

Tidy html like text according optional configuration options.

var opts = {
    'doctype':'html5',
    'tidy-mark':false,
    'indent':true
}

Platform support

  • Linux
  • Windows 32/64

Credits

FAQs

Package last updated on 29 Sep 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc