diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 5b520a42..a54de11a 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -854,7 +854,10 @@ namespace WebSocketSharp.Net if (output == null) throw new ArgumentNullException ("output"); - output.Write (s.Length > 0 ? htmlAttributeEncode (s) : s); + if (s.Length == 0) + return; + + output.Write (htmlAttributeEncode (s)); } ///