Skip to content

Commit

Permalink
Fixed #58
Browse files Browse the repository at this point in the history
Updated code to not call String.Replace() if we have an empty string for
what to replace.
  • Loading branch information
Tom Francis committed Nov 30, 2020
1 parent fb31a5b commit 3491f55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UrlVariable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ private static string ReplaceFunction(string function, string content, Applicati
}

case "replace":
if (parts.Length >= 3)
if ((parts.Length >= 3) && (parts[1].Length > 0))
{
return content.Replace(parts[1], parts[2]);
}
Expand Down

0 comments on commit 3491f55

Please sign in to comment.