Socket
Socket
Sign inDemoInstall

htmljs-parser

Package Overview
Dependencies
Maintainers
2
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

htmljs-parser - npm Package Compare versions

Comparing version 1.5.12 to 1.5.13

test/fixtures/autotest/strip-bom/expected.html

8

BaseParser.js

@@ -125,2 +125,10 @@ 'use strict';

// Strip off the byte order mark (BOM) sequence
// at the beginning of the file:
// - https://en.wikipedia.org/wiki/Byte_order_mark
// > The Unicode Standard permits the BOM in UTF-8, but does not require or recommend its use.
if (data.charCodeAt(0) === 0xFEFF) {
data = data.slice(1);
}
this.data = data;

@@ -127,0 +135,0 @@ this.maxPos = data.length - 1;

2

package.json

@@ -38,3 +38,3 @@ {

},
"version": "1.5.12"
"version": "1.5.13"
}

@@ -9,2 +9,4 @@ exports.getSource = function() {

].join('\r\n');
};
};
exports.preserveLineEndings = true;

@@ -70,2 +70,6 @@ var chai = require('chai');

if (!options || (options.preserveLineEndings !== true)) {
inputHtmlJs = inputHtmlJs.replace(/\r\n|\n/g, "\n");
}
if (options && options.checkThrownError) {

@@ -72,0 +76,0 @@ var error;

@@ -153,2 +153,8 @@ 'use strict';

// Strip off the BOM character sequence so that substring tests
// will match the parsed result
if (src.charCodeAt(0) === 0xFEFF) {
src = src.slice(1);
}
this.src = src;

@@ -155,0 +161,0 @@ this.includePositions = options && options.includePositions === true;

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