From 04da4227b5d25b8ced014df352d1656f81a65d17 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Tue, 5 Sep 2017 18:07:05 +0200 Subject: [PATCH] Try not to change ASS tags when not needed - thx Skrity :) Fix #2537 --- libse/SubtitleFormats/AdvancedSubStationAlpha.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libse/SubtitleFormats/AdvancedSubStationAlpha.cs b/libse/SubtitleFormats/AdvancedSubStationAlpha.cs index 037ddd259..e28523624 100644 --- a/libse/SubtitleFormats/AdvancedSubStationAlpha.cs +++ b/libse/SubtitleFormats/AdvancedSubStationAlpha.cs @@ -554,6 +554,10 @@ Format: Layer, Start, End, Style, Actor, MarginL, MarginR, MarginV, Effect, Text public static string FormatText(Paragraph p) { string text = p.Text.Replace(Environment.NewLine, "\\N"); + + if (!text.Contains('<')) + return text; + text = text.Replace("", @"{\i1}"); text = text.Replace("", @"{\i0}"); text = text.Replace("", @"{\i}");