Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@magicbell/magicbell-react

Package Overview
Dependencies
Maintainers
2
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@magicbell/magicbell-react - npm Package Compare versions

Comparing version 5.1.1-beta.4 to 5.1.1-beta.5

5

dist/cjs/lib/html.js

@@ -76,5 +76,2 @@ "use strict";

if (data.tagName === 'p' && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.includes('####'))) {
var br = node.nextElementSibling;
if ((br === null || br === void 0 ? void 0 : br.tagName) === 'BR')
br.setAttribute('style', 'display: none');
return (_b = node.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(node);

@@ -84,4 +81,4 @@ }

var sanitized = dompurify_1.default.sanitize(html, { FORBID_ATTR: ['style'], FORBID_TAGS: ['style', 'img', 'svg', 'br'] });
return text_clipper_1.default(sanitized, 200, { html: true });
return text_clipper_1.default(sanitized, 200, { html: true, maxLines: 3 });
}
exports.sanitizeHTML = sanitizeHTML;

@@ -69,5 +69,2 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

if (data.tagName === 'p' && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.includes('####'))) {
var br = node.nextElementSibling;
if ((br === null || br === void 0 ? void 0 : br.tagName) === 'BR')
br.setAttribute('style', 'display: none');
return (_b = node.parentNode) === null || _b === void 0 ? void 0 : _b.removeChild(node);

@@ -77,3 +74,3 @@ }

var sanitized = DOMPurify.sanitize(html, { FORBID_ATTR: ['style'], FORBID_TAGS: ['style', 'img', 'svg', 'br'] });
return clip(sanitized, 200, { html: true });
return clip(sanitized, 200, { html: true, maxLines: 3 });
}

2

package.json
{
"name": "@magicbell/magicbell-react",
"version": "5.1.1-beta.4",
"version": "5.1.1-beta.5",
"description": "A set of React components to build a notification inbox",

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

import DOMPurify from 'dompurify';
import { Liquid } from 'liquidjs';
import clip from 'text-clipper';
/**

@@ -24,5 +25,2 @@ * Function to compile a template with Liquid.

if (data.tagName === 'p' && node.textContent?.includes('####')) {
const br = node.nextElementSibling;
if (br?.tagName === 'BR') br.setAttribute('style', 'display: none');
return node.parentNode?.removeChild(node);

@@ -33,3 +31,3 @@ }

const sanitized = DOMPurify.sanitize(html, { FORBID_ATTR: ['style'], FORBID_TAGS: ['style', 'img', 'svg', 'br'] });
return clip(sanitized, 200, { html: true });
return clip(sanitized, 200, { html: true, maxLines: 3 });
}
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