From 343c0acf6a896ad7691485571ba6409a908dc194 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 29 Sep 2018 20:41:54 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpUtility.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 17e6c923..5b520a42 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -843,10 +843,7 @@ namespace WebSocketSharp.Net if (s == null) throw new ArgumentNullException ("s"); - if (s.Length == 0) - return s; - - return htmlAttributeEncode (s); + return s.Length > 0 ? htmlAttributeEncode (s) : s; } public static void HtmlAttributeEncode (string s, TextWriter output)