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

grunt-inline

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-inline - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

2

package.json

@@ -9,3 +9,3 @@ {

"description": "Inlines <img>, <script> and <link> tags into the same file.",
"version": "0.2.6",
"version": "0.2.7",
"keywords": [

@@ -12,0 +12,0 @@ "gruntplugin",

@@ -77,2 +77,16 @@ /*

ret = grunt.file.read( inlineFilePath );
// @otod need to be checked, add bye herbert
var _more = src.match(/^(..\/)+/ig);
if(_more = _more && _more[0]){
var _addMore = function(){
var _ret = arguments[0],_src = arguments[2];
if(!_src.match(/^http\:\/\//)){
_ret =arguments[1] + _more + arguments[2] + arguments[3];
grunt.log.writeln('inline >含有相对目录进行替换操作,替换之后的路径:' + _ret );
}
return _ret;
}
ret = ret.replace(/(<script.+?src=["'])([^"']+?)(["'].*?><\/script>)/g,_addMore);
}
}else{

@@ -79,0 +93,0 @@ grunt.log.error("Couldn't find " + inlineFilePath + '!');

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