Skip to content

Commit

Permalink
mask strings before pseudo array conversion
Browse files Browse the repository at this point in the history
see #118
  • Loading branch information
Banaanae committed Dec 21, 2024
1 parent 6415a10 commit f5d60bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ConvertFuncs.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -3930,7 +3930,9 @@ ConvertPseudoArray(ScriptStringInput, PseudoArrayName) {
if (PseudoArrayName.HasOwnProp("regex") && PseudoArrayName.regex)
{
; this is regexmatch array[0] - validate that array has been set -> (m&&m[0])
maskStrings(&ScriptStringInput)
ScriptStringInput := RegExReplace(ScriptStringInput, "is)(?<!\w|&|\.)" ArrayName "(?!&|\w|%|\.|\[|\s*:=)", "(" ArrayName "&&" NewName ")")
restoreStrings(&ScriptStringInput)
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if RegExMatch(uri, "^\[url=")
RegExMatch(uri, "\G[^\]]*", &uri, 6)
else
{
msgResult := MsgBox("URI appears invalid:`n" (uri && uri[0]), "", 1)
msgResult := MsgBox("URI appears invalid:`n" (uri&&uri[0]), "", 1)
if (msgResult = "Cancel")
return
}

0 comments on commit f5d60bf

Please sign in to comment.