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

electron-html-to

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-html-to - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

13

lib/conversion.js

@@ -11,2 +11,6 @@ 'use strict';

var _url = require('url');
var _url2 = _interopRequireDefault(_url);
var _debug = require('debug');

@@ -133,3 +137,10 @@

// prefix the request in order to recognize later in electron protocol handler
localOpts.url = localOpts.url || 'file://' + localOpts.htmlFile + '?ELECTRON-HTML-TO-LOAD-PAGE';
localOpts.url = localOpts.url || _url2['default'].format({
protocol: 'file',
pathname: localOpts.htmlFile,
query: {
'ELECTRON-HTML-TO-LOAD-PAGE': true
}
});
localOpts.chromeCommandLineSwitches = options.chromeCommandLineSwitches;

@@ -136,0 +147,0 @@ localOpts.extraHeaders = localOpts.extraHeaders || {};

9

lib/scripts/registerProtocol.js

@@ -25,3 +25,3 @@ /* eslint no-var: [0] */

log('request to load the page:', url);
resolveFileRequest(url, callback);
resolveFileRequest(requestObj.url, callback);
} else if (requestObj.url.lastIndexOf('file:///', 0) === 0 && !allowLocalFilesAccess) {

@@ -40,3 +40,3 @@ // potentially dangerous request

log('request to load a file:', url);
resolveFileRequest(url, callback);
resolveFileRequest(requestObj.url, callback);
}

@@ -56,5 +56,9 @@ }, function (interceptProtocolErr) {

var url = requestedUrl,
parsedUrl,
mimeType,
fileBuf;
parsedUrl = urlModule.parse(url);
url = parsedUrl.pathname;
if (isURLEncoded(url)) {

@@ -68,3 +72,2 @@ url = decodeURIComponent(url);

url = urlModule.parse(url).pathname;
mimeType = mime.lookup(path.extname(url)) || 'text/plain';

@@ -71,0 +74,0 @@

{
"name": "electron-html-to",
"version": "2.0.1",
"version": "2.0.2",
"description": "Convert html to html/image using electron",

@@ -5,0 +5,0 @@ "main": "lib/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