diff --git a/Runtime/Scripting/DomProxies/EncodingHelpers.cs b/Runtime/Scripting/DomProxies/EncodingHelpers.cs index 5a812ab6..f50f3b98 100644 --- a/Runtime/Scripting/DomProxies/EncodingHelpers.cs +++ b/Runtime/Scripting/DomProxies/EncodingHelpers.cs @@ -10,6 +10,7 @@ public static class EncodingHelpers public static string encodeURI(string input) { + if (input == null) return ""; var len = input.Length; if (len < EscapeLimit) return Uri.EscapeUriString(input); @@ -24,11 +25,13 @@ public static string encodeURI(string input) public static string decodeURI(string input) { + if (input == null) return ""; return Uri.UnescapeDataString(input); } public static string encodeURIComponent(string input) { + if (input == null) return ""; var len = input.Length; if (len < EscapeLimit) return Uri.EscapeDataString(input); @@ -43,6 +46,7 @@ public static string encodeURIComponent(string input) public static string decodeURIComponent(string input) { + if (input == null) return ""; return Uri.UnescapeDataString(input); } }