Update to Electron 4.x
This commit is contained in:
parent
667b2e63f1
commit
ae161c6cf6
10 changed files with 74 additions and 60 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
const { isNumber, compact } = require('lodash');
|
||||
const he = require('he');
|
||||
const punycode = require('punycode');
|
||||
const nodeUrl = require('url');
|
||||
const LinkifyIt = require('linkify-it');
|
||||
|
||||
const linkify = LinkifyIt();
|
||||
|
@ -330,8 +330,7 @@ function isLinkSneaky(link) {
|
|||
const domain = getDomain(link);
|
||||
|
||||
// This is necesary because getDomain returns domains in punycode form
|
||||
// We'd like to use require('url').domainToUnicode() but it's a no-op in a BrowserWindow
|
||||
const unicodeDomain = punycode.toUnicode(domain);
|
||||
const unicodeDomain = nodeUrl.domainToUnicode(domain);
|
||||
|
||||
const chunks = unicodeDomain.split('.');
|
||||
for (let i = 0, max = chunks.length; i < max; i += 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue