shortcode-tree
Advanced tools
Comparing version 1.4.13 to 1.4.14
@@ -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 @@ } |
{ | ||
"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"}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136137
3052