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
commit d51e8ec378
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);