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

DOMBuilder

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

DOMBuilder - npm Package Compare versions

Comparing version 1.4.1 to 1.4.2

70

DOMBuilder.js

@@ -394,2 +394,8 @@ (function(__global__, undefined)

{
// innerHTML is a special case, as we can use it to (perhaps
// inadvisedly) to specify entire contents as a string.
if (attr === "innerHTML")
{
continue;
}
// Don't create attributes which wouldn't make sense in HTML mode -

@@ -425,20 +431,27 @@ // they can be dealt with afet insertion using addEvents().

// Contents
for (var i = 0, l = this.childNodes.length; i < l; i++)
// If innerHTML was given, use it exclusively for the contents
if ("innerHTML" in this.attributes)
{
var node = this.childNodes[i];
if (node instanceof HTMLElement || node instanceof SafeString)
parts.push(this.attributes.innerHTML);
}
else
{
for (var i = 0, l = this.childNodes.length; i < l; i++)
{
parts.push(node.toString(trackEvents));
var node = this.childNodes[i];
if (node instanceof HTMLElement || node instanceof SafeString)
{
parts.push(node.toString(trackEvents));
}
else if (node === "\u00A0")
{
// Special case to convert these back to entities,
parts.push("&nbsp;");
}
else
{
// Coerce to string and escape
parts.push(escapeHTML(""+node));
}
}
else if (node === "\u00A0")
{
// Special case to convert these back to entities,
parts.push("&nbsp;");
}
else
{
// Coerce to string and escape
parts.push(escapeHTML(""+node));
}
}

@@ -637,3 +650,3 @@

children = (argsLength == 2 && isArray(args[1])
? args[1] // (attributes, [child1, ...])
? args[1] // (attributes, [child1, ...])
: slice.call(args, 1)); // (attributes, child1, ...)

@@ -652,3 +665,3 @@ }

var DOMBuilder = {
version: "1.4.1",
version: "1.4.2",

@@ -741,16 +754,19 @@ /**

// Append children
for (var i = 0, l = children.length; i < l; i++)
// If content was set via innerHTML, we're done...
if (!("innerHTML" in attributes))
{
var child = children[i];
if (child.nodeType)
// ...otherwise, append children
for (var i = 0, l = children.length; i < l; i++)
{
el.appendChild(child);
var child = children[i];
if (child.nodeType)
{
el.appendChild(child);
}
else
{
el.appendChild(document.createTextNode(""+child));
}
}
else
{
el.appendChild(document.createTextNode(""+child));
}
}
return el;

@@ -757,0 +773,0 @@ },

{
"name": "DOMBuilder",
"version": "1.4.1",
"version": "1.4.2",
"description": "Builder library - generate HTML or DOM Elements (mostly) interchangeably",
"keywords": ["DOM", "HTML", "builder", "fragments"],
"tags": ["DOM", "HTML", "builder", "fragments"],
"author": "Jonathan Buchanan <jonathan.buchanan@gmail.com> (https://github.com/insin)",
"homepage": "http://readthedocs.org/docs/dombuilder/en/1.4.1/index.html",
"homepage": "http://readthedocs.org/docs/dombuilder/en/1.4.2/index.html",
"main": "./DOMBuilder.js",

@@ -9,0 +9,0 @@ "files": ["./DOMBuilder.js"],

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