Skip to content

Commit

Permalink
编码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhanggaolei001 committed Sep 2, 2021
1 parent 670efce commit 3acc342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ private void Browser_TitleChanged(object sender, DependencyPropertyChangedEventA
ICookieManager cm = Browser.WebBrowser.GetCookieManager();
var visitor = new TaskCookieVisitor();
cm.VisitAllCookies(visitor);
ck = visitor.Task.Result.Where(cookie => cookie.Name == "pt_key" || cookie.Name == "pt_pin").Aggregate(ck, (current, cookie) => current + $"{cookie.Name}={cookie.Value};");
ck = System.Web.HttpUtility.UrlEncode(ck);
ck = visitor.Task.Result.Where(cookie => cookie.Name == "pt_key" || cookie.Name == "pt_pin").Aggregate(ck, (current, cookie) => current + $"{cookie.Name}={System.Web.HttpUtility.UrlEncode(cookie.Value)};");
if (ck.Contains("pt_key") && ck.Contains("pt_pin"))
{
Clipboard.SetText(ck);
Expand Down

0 comments on commit 3acc342

Please sign in to comment.