New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-generator-amp

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-generator-amp - npm Package Compare versions

Comparing version 0.1.16 to 0.1.19

18

lib/generator.js

@@ -295,6 +295,5 @@ 'use strict';

if(instagram_shortCode && instagram_shortCode.length >= 2){
replaceStr = replaceStr.replace(igMatch[i],'<amp-instagram data-shortcode="' + instagram_shortCode[1] + '" width="500" height="500" layout="responsive"></amp-instagram>');
isInstagramContain = true;
}
replaceStr = replaceStr.replace(igMatch[i],'<amp-instagram data-shortcode="' + instagram_shortCode[1] + '" width="500" height="500" layout="responsive"></amp-instagram>');
isInstagramContain = true;
}

@@ -304,2 +303,15 @@ }

//------------------------------------
// other iframe
//------------------------------------
var ifElseMatch = replaceStr.match(/\<iframe.*?\>\<\/iframe\>/g);
if(ifElseMatch){
for(i=0; i<ifElseMatch.length; i++){
var iframeSrc = ifElseMatch[i].match(/src\="(.*?)"/);
if(iframeSrc && iframeSrc.length >= 2){
replaceStr = replaceStr.replace(ifElseMatch[i],'<a href="'+ iframeSrc[1] + '" target="_blank">' + iframeSrc[1] + '</a>');
}
}
}

@@ -306,0 +318,0 @@

6

package.json
{
"name": "hexo-generator-amp",
"version": "0.1.16",
"version": "0.1.19",
"main": "index",

@@ -42,3 +42,5 @@ "dependencies": {

"hexo",
"amp"
"amp",
"google",
"mobile"
],

@@ -45,0 +47,0 @@ "license": "MIT",

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