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 5.4.2 to 6.0.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

## [6.0.0](https://github.com/taoqf/node-fast-html-parser/compare/v5.4.2-0...v6.0.0) (2022-09-08)
### Bug Fixes
* Preserve invalid nested A tags in AST (see [#215](https://github.com/taoqf/node-fast-html-parser/issues/215) for detail) ([374188f](https://github.com/taoqf/node-fast-html-parser/commit/374188f1c6d6c6d0567348b8e8d20957f5a93fb8))
### [5.4.2](https://github.com/taoqf/node-fast-html-parser/compare/v5.4.2-0...v5.4.2) (2022-08-30)

@@ -7,0 +14,0 @@

4

dist/nodes/html.d.ts

@@ -206,2 +206,6 @@ import VoidTag from '../void-tag';

comment: boolean;
/**
* @see PR #215 for explanation
*/
fixNestedATags?: boolean;
parseNoneClosedTags?: boolean;

@@ -208,0 +212,0 @@ blockTextElements: {

6

dist/nodes/html.js

@@ -1063,3 +1063,3 @@ "use strict";

data = "<".concat(frameflag, ">").concat(data, "</").concat(frameflag, ">");
var lowerCaseTagName = options.lowerCaseTagName;
var lowerCaseTagName = options.lowerCaseTagName, fixNestedATags = options.fixNestedATags;
var dataEndPos = data.length - (frameflag.length + 2);

@@ -1116,3 +1116,3 @@ var frameFlagOffset = frameflag.length + 2;

// Prevent nested A tags by terminating the last A and starting a new one : see issue #144
if (tagName === 'a' || tagName === 'A') {
if (fixNestedATags && (tagName === 'a' || tagName === 'A')) {
if (noNestedTagIndex !== undefined) {

@@ -1156,3 +1156,3 @@ stack.splice(noNestedTagIndex);

while (true) {
if (tagName === 'a' || tagName === 'A')
if (noNestedTagIndex != null && (tagName === 'a' || tagName === 'A'))
noNestedTagIndex = undefined;

@@ -1159,0 +1159,0 @@ if (currentParent.rawTagName === tagName) {

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

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

Sorry, the diff of this file is too big to display

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