Socket
Socket
Sign inDemoInstall

mjml-parser-xml

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-parser-xml - npm Package Compare versions

Comparing version 4.0.5 to 4.1.0-beta.1

2

lib/helpers/addCDATASection.js

@@ -15,3 +15,3 @@ 'use strict';

var regexTag = function regexTag(tag) {
return new RegExp('<' + tag + '([^>/]*)>([^]*?)</' + tag + '>', 'gmi');
return new RegExp('<' + tag + '((?: (?:(?:"[^"]*?")*(?:\'[^\']*?\')*[^/>\'"]*?)*?)|)>([^]*?)</' + tag + '>', 'gmi');
};

@@ -18,0 +18,0 @@ var replaceTag = function replaceTag(tag) {

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

var _mapValues = require('lodash/mapValues');
var _mapValues2 = _interopRequireDefault(_mapValues);
var _path = require('path');

@@ -58,6 +54,2 @@

var _parseAttributes = require('./helpers/parseAttributes');
var _parseAttributes2 = _interopRequireDefault(_parseAttributes);
var _cleanNode = require('./helpers/cleanNode');

@@ -104,3 +96,5 @@

_options$filePath = options.filePath,
filePath = _options$filePath === undefined ? '.' : _options$filePath;
filePath = _options$filePath === undefined ? '.' : _options$filePath,
_options$ignoreInclud = options.ignoreIncludes,
ignoreIncludes = _options$ignoreInclud === undefined ? false : _options$ignoreInclud;

@@ -118,3 +112,2 @@

safeXml = (0, _parseAttributes2.default)(safeXml);
safeXml = (0, _addCDATASection2.default)(CDATASections, safeXml);

@@ -215,3 +208,3 @@

if (name === 'mj-include') {
if (name === 'mj-include' && !ignoreIncludes) {
inInclude = true;

@@ -226,6 +219,2 @@ return handleInclude(decodeURIComponent(attrs.path), line);

attrs = (0, _mapValues2.default)(attrs, function (val) {
return decodeURIComponent(val);
});
var newNode = {

@@ -265,3 +254,3 @@ file: filePath,

if (val) {
cur.content = (0, _parseAttributes.decodeAttributes)(val);
cur.content = val;
}

@@ -281,3 +270,5 @@ },

}, {
xmlMode: true
recognizeCDATA: true,
decodeEntities: false,
recognizeSelfClosing: true
});

@@ -284,0 +275,0 @@

{
"name": "mjml-parser-xml",
"description": "mjml-parser-xml",
"version": "4.0.5",
"version": "4.1.0-beta.1",
"main": "lib/index.js",

@@ -17,3 +17,4 @@ "repository": {

"clean": "cross-env ../../node_modules/.bin/rimraf lib",
"build": "cross-env ../../node_modules/.bin/babel src --out-dir lib"
"build": "cross-env ../../node_modules/.bin/babel src --out-dir lib",
"test": "node ./test/test.js"
},

@@ -24,3 +25,8 @@ "dependencies": {

"lodash": "^4.17.2"
},
"devDependencies": {
"chai": "^4.1.1",
"mjml": "^4.1.0-beta.1",
"mjml-core": "^4.1.0-beta.1"
}
}

Sorry, the diff of this file is not supported yet

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