diff --git a/src/Framework/Framework/Routing/UrlHelper.cs b/src/Framework/Framework/Routing/UrlHelper.cs index 6783c0494a..1ec51999e0 100644 --- a/src/Framework/Framework/Routing/UrlHelper.cs +++ b/src/Framework/Framework/Routing/UrlHelper.cs @@ -145,7 +145,8 @@ private static bool ContainsOnlyValidUrlChars(string url) } else { - return Uri.EscapeDataString(value.ToString()); + var strVal = value.ToString(); + return strVal == null ? null : Uri.EscapeDataString(strVal); } } }