From 26cdd4374ffc0254cc2e97bf182b9435b746ce8e Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 9 Jan 2019 22:12:11 +0900 Subject: [PATCH] [Modify] Edit it --- websocket-sharp/Net/HttpUtility.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 1e982601..2982fa88 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -257,6 +257,29 @@ namespace WebSocketSharp.Net return buff.ToString (); } + /// + /// Converts the specified string to an HTML-encoded string. + /// + /// + /// + /// MS .NET starts encoding with &# from the character code 160 and + /// stops at the character code 255. + /// + /// + /// This method does not do that. One reason is the unicode characters + /// 65308 and 65310 that look like < and >. + /// + /// + /// + /// A that represents an encoded string. + /// + /// + /// A to encode. + /// + /// + /// A : true if encodes without a NCR; + /// otherwise, false. + /// private static string htmlEncode (string s, bool minimal) { var buff = new StringBuilder ();