Socket
Socket
Sign inDemoInstall

mithril-node-render

Package Overview
Dependencies
0
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.2.1

14

index.js

@@ -40,10 +40,10 @@ 'use strict';

var styles = attrs.style;
if (typeof styles === 'string') {
return ' style="' + styles + '"';
if (typeof styles === 'object') {
styles = Object.keys(styles).map(function(property) {
return [camelToDash(property).toLowerCase(), styles[property]].join(':');
}).join(';');
}
return ' style="' + Object.keys(styles).map(function(property) {
return [camelToDash(property).toLowerCase(), styles[property]].join(':');
}).join(';') + '"';
return ' style="' + escapeHtml(styles) + '"';
}
return ' ' + (name === 'className' ? 'class' : name) + '="' + attrs[name] + '"';
return ' ' + escapeHtml(name === 'className' ? 'class' : name) + '="' + escapeHtml(attrs[name]) + '"';
}).join('');

@@ -83,3 +83,3 @@ }

var children = createChildrenContent(view);
if (!children && VOID_TAGS.indexOf(view.tag) >= 0) {
if (!children && VOID_TAGS.indexOf(view.tag.toLowerCase()) >= 0) {
return '<' + view.tag + createAttrString(view.attrs) + '>';

@@ -86,0 +86,0 @@ }

{
"name": "mithril-node-render",
"version": "0.2.0",
"version": "0.2.1",
"description": "Node rending of mithril views",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,3 +43,6 @@ 'use strict';

t.equal(render(m('div', '<foo></foo>')), '<div>&lt;foo&gt;&lt;/foo&gt;</div>');
t.equal(render(m('div', {
style: '"></div><div a="'
})), '<div style="&quot;&gt;&lt;/div&gt;&lt;div a=&quot;"></div>');
t.end();
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc