From 3491f551b72ab465d753ea2c08dda0cc4874726f Mon Sep 17 00:00:00 2001 From: Tom Francis Date: Mon, 30 Nov 2020 17:38:02 -0500 Subject: [PATCH] Fixed #58 Updated code to not call String.Replace() if we have an empty string for what to replace. --- UrlVariable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UrlVariable.cs b/UrlVariable.cs index 56a4c50..0922a3f 100644 --- a/UrlVariable.cs +++ b/UrlVariable.cs @@ -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]); }