2
0
mirror of https://github.com/gchq/CyberChef synced 2026-01-06 10:33:18 +00:00

Merge branch 'master' of github.com:gchq/CyberChef into node-lib

This commit is contained in:
d98762625
2019-05-23 15:07:28 +01:00
4 changed files with 585 additions and 515 deletions

View File

@@ -834,7 +834,7 @@ class Utils {
args = m[2]
.replace(/"/g, '\\"') // Escape double quotes
.replace(/(^|,|{|:)'/g, '$1"') // Replace opening ' with "
.replace(/([^\\]|[^\\]\\\\)'(,|:|}|$)/g, '$1"$2') // Replace closing ' with "
.replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g, '$1"$2') // Replace closing ' with "
.replace(/\\'/g, "'"); // Unescape single quotes
args = "[" + args + "]";

View File

@@ -293,7 +293,9 @@ class HTMLIngredient {
const op = el.parentNode.parentNode;
const target = op.querySelectorAll(".arg")[this.target];
target.value = el.childNodes[el.selectedIndex].getAttribute("populate-value");
const popVal = el.childNodes[el.selectedIndex].getAttribute("populate-value");
if (popVal !== "") target.value = popVal;
const evt = new Event("change");
target.dispatchEvent(evt);