From d4002ee5ad77204e443ccd2d8d020db8da5d4b08 Mon Sep 17 00:00:00 2001 From: niksedk Date: Mon, 27 Nov 2023 09:36:23 +0100 Subject: [PATCH] Fix for unwanted "
" in MS translator - thx Miguel :) --- Changelog.txt | 1 + src/libse/AutoTranslate/MicrosoftTranslator.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Changelog.txt b/Changelog.txt index 561a1be49..f98452f5b 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -17,6 +17,7 @@ * FIXED: * Fix minor space issue with "Fix italic tags" - thx Adam * Focus text box after "Set end, add new and go to new" - thx aoifeaoibhee + * Fix for unwanted "
" in MS translator - thx Miguel 4.0.2 (19th November 2023) diff --git a/src/libse/AutoTranslate/MicrosoftTranslator.cs b/src/libse/AutoTranslate/MicrosoftTranslator.cs index f0347cc08..8cccb3582 100644 --- a/src/libse/AutoTranslate/MicrosoftTranslator.cs +++ b/src/libse/AutoTranslate/MicrosoftTranslator.cs @@ -100,6 +100,9 @@ namespace Nikse.SubtitleEdit.Core.AutoTranslate { var textDictionary = (Dictionary)o; var res = (string)textDictionary["text"]; + res = res.Replace("
", Environment.NewLine); + res = res.Replace("
", Environment.NewLine); + res = res.Replace("
", Environment.NewLine); results.Add(res); } }