diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 4d9f8ad0..16cf9bb1 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -779,7 +779,10 @@ namespace WebSocketSharp.Net /// public static string HtmlDecode (string s) { - if (s == null || s.Length == 0 || !s.Contains ('&')) + if (s == null) + throw new ArgumentNullException ("s"); + + if (s.Length == 0) return s; var entity = new StringBuilder ();