Use https for all Google url

This commit is contained in:
niksedk 2015-07-29 16:02:18 +02:00
parent 32528381db
commit 07770ef8da
5 changed files with 6 additions and 6 deletions

View File

@ -399,7 +399,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
try try
{ {
string url = String.Format("http://translate.google.com/?hl=en&eotf=1&sl={0}&tl={1}&q={2}", languagePair.Substring(0, 2), languagePair.Substring(3), "123 456"); string url = String.Format("https://translate.google.com/?hl=en&eotf=1&sl={0}&tl={1}&q={2}", languagePair.Substring(0, 2), languagePair.Substring(3), "123 456");
var result = Utilities.DownloadString(url).ToLower(); var result = Utilities.DownloadString(url).ToLower();
int idx = result.IndexOf("charset", StringComparison.Ordinal); int idx = result.IndexOf("charset", StringComparison.Ordinal);
int end = result.IndexOf('"', idx + 8); int end = result.IndexOf('"', idx + 8);

View File

@ -13708,13 +13708,13 @@ namespace Nikse.SubtitleEdit.Forms
private void buttonGoogleIt_Click(object sender, EventArgs e) private void buttonGoogleIt_Click(object sender, EventArgs e)
{ {
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(textBoxSearchWord.Text)); System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(textBoxSearchWord.Text));
} }
private void buttonGoogleTranslateIt_Click(object sender, EventArgs e) private void buttonGoogleTranslateIt_Click(object sender, EventArgs e)
{ {
string languageId = Utilities.AutoDetectGoogleLanguage(_subtitle); string languageId = Utilities.AutoDetectGoogleLanguage(_subtitle);
System.Diagnostics.Process.Start("http://translate.google.com/#auto|" + languageId + "|" + Utilities.UrlEncode(textBoxSearchWord.Text)); System.Diagnostics.Process.Start("https://translate.google.com/#auto|" + languageId + "|" + Utilities.UrlEncode(textBoxSearchWord.Text));
} }
private void ButtonPlayCurrentClick(object sender, EventArgs e) private void ButtonPlayCurrentClick(object sender, EventArgs e)

View File

@ -268,7 +268,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
string text = textBoxWord.Text; string text = textBoxWord.Text;
if (!string.IsNullOrWhiteSpace(text)) if (!string.IsNullOrWhiteSpace(text))
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(text)); System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(text));
} }
private void OcrSpellCheck_KeyDown(object sender, KeyEventArgs e) private void OcrSpellCheck_KeyDown(object sender, KeyEventArgs e)

View File

@ -218,7 +218,7 @@ namespace Nikse.SubtitleEdit.Forms
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G) else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.G)
{ {
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
System.Diagnostics.Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(textBoxWord.Text)); System.Diagnostics.Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(textBoxWord.Text));
} }
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z) else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
{ {

View File

@ -8083,7 +8083,7 @@ namespace Nikse.SubtitleEdit.Forms
if (text.Contains(':')) if (text.Contains(':'))
{ {
text = text.Substring(text.IndexOf(':') + 1).Trim(); text = text.Substring(text.IndexOf(':') + 1).Trim();
Process.Start("http://www.google.com/search?q=" + Utilities.UrlEncode(text)); Process.Start("https://www.google.com/search?q=" + Utilities.UrlEncode(text));
} }
} }
} }