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

preact-render-to-string

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-render-to-string - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

1

dist/index.js

@@ -222,2 +222,3 @@ (function (global, factory) {

s = '<' + nodeName + s + '>';
if (String(nodeName).match(/[\s\n\/='"\0<>]/)) throw s;

@@ -224,0 +225,0 @@ if (VOID_ELEMENTS.indexOf(nodeName) > -1) {

@@ -232,2 +232,3 @@ (function (global, factory) {

s = '<' + nodeName + s + '>';
if (String(nodeName).match(/[\s\n\/='"\0<>]/)) throw s;

@@ -234,0 +235,0 @@ if (VOID_ELEMENTS.indexOf(nodeName) > -1) {

2

package.json
{
"name": "preact-render-to-string",
"amdName": "preactRenderToString",
"version": "3.7.1",
"version": "3.7.2",
"description": "Render JSX to an HTML string, with support for Preact components.",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -165,2 +165,3 @@ import { objectKeys, encodeEntities, falsey, memoize, indent, isLargeString, styleObjToCss, hashToClassName, assign, getNodeProps } from './util';

s = `<${nodeName}${s}>`;
if (String(nodeName).match(/[\s\n\/='"\0<>]/)) throw s;

@@ -167,0 +168,0 @@ if (VOID_ELEMENTS.indexOf(nodeName)>-1) {

@@ -88,2 +88,12 @@ import { render, shallowRender } from '../src';

it('should throw for invalid nodeName values', () => {
expect(() => render(h('div'))).not.to.throw();
expect(() => render(h('x-💩'))).not.to.throw();
expect(() => render(h('a b'))).to.throw(/<a b>/);
expect(() => render(h('a\0b'))).to.throw(/<a\0b>/);
expect(() => render(h('a>'))).to.throw(/<a>>/);
expect(() => render(h('<'))).to.throw(/<<>/);
expect(() => render(h('"'))).to.throw(/<">/);
});
it('should collapse collapsible attributes', () => {

@@ -90,0 +100,0 @@ let rendered = render(<div class="" style="" foo={true} bar />),

Sorry, the diff of this file is not supported yet

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