From ecafda839450d6eed1e7489c4b42aea34eea4527 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Sun, 9 Jun 2024 08:04:15 +0200 Subject: [PATCH] Validate prompt chars - thx nyck33 :) Fix #8506 --- src/ui/Forms/Translate/AutoTranslateSettings.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui/Forms/Translate/AutoTranslateSettings.cs b/src/ui/Forms/Translate/AutoTranslateSettings.cs index 4369f7519..83a194619 100644 --- a/src/ui/Forms/Translate/AutoTranslateSettings.cs +++ b/src/ui/Forms/Translate/AutoTranslateSettings.cs @@ -89,6 +89,18 @@ namespace Nikse.SubtitleEdit.Forms.Translate private void buttonOk_Click(object sender, EventArgs e) { + if (nikseTextBoxPrompt.Text.Contains('{')) + { + MessageBox.Show("Character not allowed: {"); + return; + } + + if (nikseTextBoxPrompt.Text.Contains('}')) + { + MessageBox.Show("Character not allowed: }"); + return; + } + Configuration.Settings.Tools.AutoTranslateDelaySeconds = (int)nikseUpDownDelay.Value; Configuration.Settings.Tools.AutoTranslateMaxBytes = (int)nikseUpDownMaxBytes.Value;