Socket
Socket
Sign inDemoInstall

shortcode-tree

Package Overview
Dependencies
0
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.13 to 1.4.14

3

dist/shortcode-formatter.js

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

strValue = fnReplaceAll(strValue, "\\" + ShortcodeFormatter.T_TAG_START, "["); // convert [ to html entity
strValue = fnReplaceAll(strValue, "\\" + ShortcodeFormatter.T_TAG_END, "]"); // convert ] to html entity
return strValue;

@@ -121,0 +124,0 @@ }

2

package.json
{
"name": "shortcode-tree",
"version": "1.4.13",
"version": "1.4.14",
"description": "Parser library for reading short codes (BB codes) into a tree structure",

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

@@ -63,2 +63,10 @@ let Shortcode = require('../src').Shortcode;

it('correctly escapes square brackets in string literals in shortcode properties', function () {
let testInput = new Shortcode("b", "Bold text", {"name": `[b]embedded[/b]`});
let expectedOutput = `[b name="[b]embedded[/b]"]Bold text[/b]`;
let actualOutput = ShortcodeFormatter.stringify(testInput);
expect(actualOutput).to.equal(expectedOutput);
});
it('does not format single number values as string literals in shortcode properties', function () {

@@ -65,0 +73,0 @@ let testInput = new Shortcode("b", "Bold text", {"one": `100%`, "two": 123, "three": 123.45, "four": "12345"});

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc