From e266d354932da9e7da099e828307ade70a798a47 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 31 Aug 2018 21:03:23 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/HttpUtility.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 48affbc5..e0419045 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -959,13 +959,11 @@ namespace WebSocketSharp.Net } if (c > 159) { - // MS starts encoding with &# from 160 and stops at 255. + // MS .NET starts encoding with &# from 160 and stops at 255. // We do not do that. One reason is the 65308/65310 unicode // characters that look like '<' and '>'. - buff.Append ("&#"); - buff.Append (((int) c).ToString (CultureInfo.InvariantCulture)); - buff.Append (";"); + buff.AppendFormat ("&#{0};", (int) c); continue; }