public static string FormatStringExportGIFT(string textContent) { if (textContent == null) { return(null); } string result = textContent; //result = StringProcess.RemoveTag(result, @"[html]", ""); result = StringProcess.RemoveTag(result, @"=", @"\="); result = StringProcess.RemoveTag(result, @"{", @"\{"); result = StringProcess.RemoveTag(result, @"}", @"\}"); result = StringProcess.RemoveTag(result, @"#", @"\#"); result = StringProcess.RemoveTag(result, @"~", @"\~"); result = StringProcess.RemoveTag(result, @":", @"\:"); result = EncodeHTML(result); result = StringProcess.RemoveTag(result, @"<cbr>", @"<br/>"); //result = "<p>" + result; //result = StringProcess.RemoveTag(result, @"\n", "<br/>"); //result = StringProcess.RemoveTag(result, @"<cbr>", @"<p/><p>"); //result = result + "<p/>"; //result = "[html]" + result; return(result); }
public static string EncodeHTML(string source) { if (source == null) { return(null); } string result = source; result = StringProcess.RemoveTag(result, @"&", @"&"); result = StringProcess.RemoveTag(result, "\"", @"""); result = StringProcess.RemoveTag(result, @"<", @"<"); result = StringProcess.RemoveTag(result, @">", @">"); return(result); }
public static string FormatStringExportXML(string textContent) { if (textContent == null) { return(null); } string result = textContent; result = StringProcess.RemoveTag(result, @"[html]", ""); result = EncodeHTML(result); result = StringProcess.RemoveTag(result, @"<cbr>", @"<br/>"); //result = "<p>" + result; //result = StringProcess.RemoveTag(result, @"\n", "<br/>"); //result = StringProcess.RemoveTag(result, @"<cbr>", @"<p/><p>"); //result = result + "<p/>"; return(result); }