diff --git a/lib/loader/pluginLoader.js b/lib/loader/pluginLoader.js index 91beb92ff..55bf9473d 100644 --- a/lib/loader/pluginLoader.js +++ b/lib/loader/pluginLoader.js @@ -283,11 +283,12 @@ // ID. pluginDeclaration.id = getFileName(bits[bits.length - 1]).toLowerCase(); if (pluginDeclaration.id in plugins) { - if (CONFIG.CUSTOM_PLUGINS_PATH && pluginPath.indexOf(CONFIG.CUSTOM_PLUGINS_PATH) > -1) { + if (pluginPath.indexOf('node_modules') > -1 + || (CONFIG.CUSTOM_PLUGINS_PATH && pluginPath.indexOf(CONFIG.CUSTOM_PLUGINS_PATH) > -1)) { console.error("Plugin '" + pluginDeclaration.id + "' overridden by", pluginPath); delete plugins[pluginDeclaration.id] } else { - console.error("Duplicate plugin id (filename)", pluginPath); + console.error("Duplicate plugin id ignored (filename)", pluginPath); return; } } diff --git a/lib/plugins/system/htmlparser/__allowHtmlparser.js b/lib/plugins/system/htmlparser/__allowHtmlparser.js new file mode 100644 index 000000000..0f4a79e45 --- /dev/null +++ b/lib/plugins/system/htmlparser/__allowHtmlparser.js @@ -0,0 +1,15 @@ + +export default { + + provides: [ + // Run for all who requests htmlparser or meta. + 'htmlparser', + '__allowHtmlparser' + ], + + getData: function() { + return { + __allowHtmlparser: true + }; + } +}; diff --git a/lib/plugins/system/htmlparser/htmlparser.js b/lib/plugins/system/htmlparser/htmlparser.js index fccbf29d2..0633fceae 100644 --- a/lib/plugins/system/htmlparser/htmlparser.js +++ b/lib/plugins/system/htmlparser/htmlparser.js @@ -16,7 +16,7 @@ export default { '__statusCode' ], - getData: function(url, whitelistRecord, options, __noCachedHtmlparserFallback, cb) { + getData: function(url, whitelistRecord, options, __noCachedHtmlparserFallback, __allowHtmlparser, cb) { var options2 = {...options, ...{ followRedirect: !!options.followHTTPRedirect,