From 08fe2b8cae26fc8a28a05dc2eb412eaa266aa359 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 23 Jan 2019 12:03:00 +0300 Subject: [PATCH] url encode --- Web/Search.aspx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Web/Search.aspx b/Web/Search.aspx index 13784cb34..8a8da700a 100644 --- a/Web/Search.aspx +++ b/Web/Search.aspx @@ -62,10 +62,10 @@ Highlite = new Regex(query.ToLowerInvariant(), RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace); var url = String.Format(ConfigurationManager.AppSettings["google.search.url"] + "?cx={0}&key={1}&hl={2}&q={3}", - ConfigurationManager.AppSettings["google.search.cx"], - ConfigurationManager.AppSettings["google.search.key"], - LanguageProvider.GetCurrentCulture().TwoLetterISOLanguageName, - query); + HttpUtility.HtmlEncode(ConfigurationManager.AppSettings["google.search.cx"]), + HttpUtility.HtmlEncode(ConfigurationManager.AppSettings["google.search.key"]), + HttpUtility.HtmlEncode(LanguageProvider.GetCurrentCulture().TwoLetterISOLanguageName), + HttpUtility.HtmlEncode(query)); using (var webClient = new WebClient()) {