mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
Fixed 'Save recipe' URL generation issue. Closes #1176
This commit is contained in:
parent
22fe5a6ae7
commit
c879af6860
3 changed files with 7 additions and 5 deletions
|
@ -895,8 +895,8 @@ class Utils {
|
|||
|
||||
while ((m = recipeRegex.exec(recipe))) {
|
||||
// Translate strings in args back to double-quotes
|
||||
args = m[2]
|
||||
.replace(/"/g, '\\"') // Escape double quotes // lgtm [js/incomplete-sanitization]
|
||||
args = m[2] // lgtm [js/incomplete-sanitization]
|
||||
.replace(/"/g, '\\"') // Escape double quotes
|
||||
.replace(/(^|,|{|:)'/g, '$1"') // Replace opening ' with "
|
||||
.replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g, '$1"$2') // Replace closing ' with "
|
||||
.replace(/\\'/g, "'"); // Unescape single quotes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue