Esempio n. 1
0
        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, @"&lt;cbr&gt;", @"<br/>");
            //result = "<p>" + result;
            //result = StringProcess.RemoveTag(result, @"\n", "<br/>");
            //result = StringProcess.RemoveTag(result, @"&lt;cbr&gt;", @"<p/><p>");
            //result = result + "<p/>";
            //result = "[html]" + result;
            return(result);
        }
Esempio n. 2
0
        public static string EncodeHTML(string source)
        {
            if (source == null)
            {
                return(null);
            }
            string result = source;

            result = StringProcess.RemoveTag(result, @"&", @"&amp;");
            result = StringProcess.RemoveTag(result, "\"", @"&quot;");
            result = StringProcess.RemoveTag(result, @"<", @"&lt;");
            result = StringProcess.RemoveTag(result, @">", @"&gt;");
            return(result);
        }
Esempio n. 3
0
        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, @"&lt;cbr&gt;", @"<br/>");
            //result = "<p>" + result;
            //result = StringProcess.RemoveTag(result, @"\n", "<br/>");
            //result = StringProcess.RemoveTag(result, @"&lt;cbr&gt;", @"<p/><p>");
            //result = result + "<p/>";
            return(result);
        }