Socket
Socket
Sign inDemoInstall

node-html-parser

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-html-parser - npm Package Compare versions

Comparing version 1.2.14 to 1.2.15

14

dist/main.js

@@ -1008,2 +1008,3 @@ var __extends = (this && this.__extends) || (function () {

};
var frameflag = 'documentfragmentcontainer';
/**

@@ -1022,2 +1023,4 @@ * Parses HTML and returns a root element

var match;
// https://github.com/taoqf/node-html-parser/issues/38
data = "<" + frameflag + ">" + data + "</" + frameflag + ">";
var _loop_1 = function () {

@@ -1032,2 +1035,5 @@ if (lastTextPos > -1) {

lastTextPos = kMarkupPattern.lastIndex;
if (match[2] === frameflag) {
return "continue";
}
if (match[0][1] === '!') {

@@ -1042,4 +1048,5 @@ // this is a comment

}
if (options.lowerCaseTagName)
if (options.lowerCaseTagName) {
match[2] = match[2].toLowerCase();
}
if (!match[1]) {

@@ -1058,2 +1065,4 @@ // not </ tags

}
// ignore container tag we add above
// https://github.com/taoqf/node-html-parser/issues/38
currentParent = currentParent.appendChild(new HTMLElement(match[2], attrs, match[3]));

@@ -1094,4 +1103,3 @@ stack.push(currentParent);

}
if (match[1] || match[4] ||
kSelfClosingElements[match[2]]) {
if (match[1] || match[4] || kSelfClosingElements[match[2]]) {
// </ or /> or <br> etc.

@@ -1098,0 +1106,0 @@ while (true) {

@@ -640,2 +640,3 @@ "use strict";

};
var frameflag = 'documentfragmentcontainer';
/**

@@ -654,2 +655,4 @@ * Parses HTML and returns a root element

var match;
// https://github.com/taoqf/node-html-parser/issues/38
data = "<" + frameflag + ">" + data + "</" + frameflag + ">";
var _loop_1 = function () {

@@ -664,2 +667,5 @@ if (lastTextPos > -1) {

lastTextPos = kMarkupPattern.lastIndex;
if (match[2] === frameflag) {
return "continue";
}
if (match[0][1] === '!') {

@@ -674,4 +680,5 @@ // this is a comment

}
if (options.lowerCaseTagName)
if (options.lowerCaseTagName) {
match[2] = match[2].toLowerCase();
}
if (!match[1]) {

@@ -690,2 +697,4 @@ // not </ tags

}
// ignore container tag we add above
// https://github.com/taoqf/node-html-parser/issues/38
currentParent = currentParent.appendChild(new HTMLElement(match[2], attrs, match[3]));

@@ -726,4 +735,3 @@ stack.push(currentParent);

}
if (match[1] || match[4] ||
kSelfClosingElements[match[2]]) {
if (match[1] || match[4] || kSelfClosingElements[match[2]]) {
// </ or /> or <br> etc.

@@ -730,0 +738,0 @@ while (true) {

{
"name": "node-html-parser",
"version": "1.2.14",
"version": "1.2.15",
"description": "A very fast HTML parser, generating a simplified DOM, with basic element query support.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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