From 770eb709919e1a434c064cbde9d4f592b631f4b1 Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 1 Jan 2019 16:26:06 +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 22a5b70d..9426779a 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -904,10 +904,7 @@ namespace WebSocketSharp.Net if (s == null) throw new ArgumentNullException ("s"); - if (s.Length == 0) - return s; - - return htmlDecode (s); + return s.Length > 0 ? htmlDecode (s) : s; } public static void HtmlDecode (string s, TextWriter output)