private static string EncodeText(string text) { switch (Configuration.Settings.SubtitleSettings.SamiHtmlEncodeMode) { case 1: return(WebUtility.HtmlEncode(text)); case 2: return(HtmlUtil.EncodeNamed(text)); case 3: return(HtmlUtil.EncodeNumeric(text)); } return(text); }
private static string EncodeText(string text) { if (Configuration.Settings.SubtitleSettings.SamiHtmlEncodeMode == 1) { return(WebUtility.HtmlEncode(text)); } else if (Configuration.Settings.SubtitleSettings.SamiHtmlEncodeMode == 2) { return(HtmlUtil.EncodeNamed(text)); } else if (Configuration.Settings.SubtitleSettings.SamiHtmlEncodeMode == 3) { return(HtmlUtil.EncodeNumeric(text)); } return(text); }