|
|
|
@ -134,6 +134,27 @@ namespace WebSocketSharp.Net
|
|
|
|
: -1;
|
|
|
|
: -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static string htmlAttributeEncode (string s)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var buff = new StringBuilder ();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var c in s) {
|
|
|
|
|
|
|
|
buff.Append (
|
|
|
|
|
|
|
|
c == '"'
|
|
|
|
|
|
|
|
? """
|
|
|
|
|
|
|
|
: c == '&'
|
|
|
|
|
|
|
|
? "&"
|
|
|
|
|
|
|
|
: c == '<'
|
|
|
|
|
|
|
|
? "<"
|
|
|
|
|
|
|
|
: c == '>'
|
|
|
|
|
|
|
|
? ">"
|
|
|
|
|
|
|
|
: c.ToString ()
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return buff.ToString ();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void initEntities ()
|
|
|
|
private static void initEntities ()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Build the dictionary of HTML entity references.
|
|
|
|
// Build the dictionary of HTML entity references.
|
|
|
|
|