Skip to content

Commit dc733f0

Browse files
campersauamaitland
authored andcommitted
WinForms Example - Use Uri.EscapeDataString instead of WebUtility.HtmlEncode for escaping query string value (#3162)
1 parent cc31e2b commit dc733f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

CefSharp.WinForms.Example/BrowserTabUserControl.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System;
66
using System.Collections.Generic;
77
using System.Linq;
8-
using System.Net;
98
using System.Runtime.InteropServices;
109
using System.Threading.Tasks;
1110
using System.Windows.Forms;
@@ -387,7 +386,7 @@ private void LoadUrl(string url)
387386
}
388387
else
389388
{
390-
var searchUrl = "https://www.google.com/search?q=" + WebUtility.HtmlEncode(url);
389+
var searchUrl = "https://www.google.com/search?q=" + Uri.EscapeDataString(url);
391390

392391
Browser.Load(searchUrl);
393392
}

0 commit comments

Comments
 (0)