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

parse5

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse5 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

22

lib/tree_construction_stage/tree_serializer.js

@@ -35,3 +35,10 @@ var defaultTreeAdapter = require('../tree_adapters/default'),

//Enquote doctype ID
function enquoteDoctypeId(id) {
var quote = id.indexOf('"') !== -1 ? '\'' : '"';
return quote + id + quote;
}
//TreeSerializer

@@ -92,4 +99,8 @@ var TreeSerializer = module.exports = function (treeAdapter) {

if (firstChild && this.treeAdapter.isTextNode(firstChild))
this.html += '\n';
if (firstChild && this.treeAdapter.isTextNode(firstChild)) {
var content = this.treeAdapter.getTextNodeContent(firstChild);
if (content[0] === '\n')
this.html += '\n';
}
}

@@ -159,10 +170,13 @@

if (publicId !== null)
this.html += ' PUBLIC "' + publicId + '"';
this.html += ' PUBLIC ' + enquoteDoctypeId(publicId);
else if (systemId !== null)
this.html += ' SYSTEM';
if (systemId !== null)
this.html += ' "' + systemId + '"';
this.html += ' ' + enquoteDoctypeId(systemId);
this.html += '>';
};

2

package.json
{
"name": "parse5",
"description": "Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification.",
"version": "1.0.0",
"version": "1.0.1",
"author": "Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)",

@@ -6,0 +6,0 @@ "keywords": [

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