Exemplo n.º 1
0
        private string HTMLProcess(string content, string path)
        {
            string str      = Path.Combine(path, "Details").Replace("\\", "/");
            string mapPath  = IOHelper.GetMapPath(str);
            string str1     = Path.Combine(path, "Temp").Replace("\\", "/");
            string mapPath1 = IOHelper.GetMapPath(str1);

            try
            {
                string str2     = str;
                string mapPath2 = IOHelper.GetMapPath(str2);
                content = HtmlContentHelper.TransferToLocalImage(content, IOHelper.GetMapPath("/"), mapPath2, string.Concat(str2, "/"));
                content = HtmlContentHelper.RemoveScriptsAndStyles(content);
                if (Directory.Exists(mapPath1))
                {
                    Directory.Delete(mapPath1, true);
                }
            }
            catch
            {
                if (Directory.Exists(mapPath1))
                {
                    string[] files = Directory.GetFiles(mapPath1);
                    for (int i = 0; i < files.Length; i++)
                    {
                        string str3 = files[i];
                        File.Copy(str3, Path.Combine(mapPath, Path.GetFileName(str3)), true);
                    }
                    Directory.Delete(mapPath1, true);
                }
            }
            return(content);
        }
        private string HTMLProcess(string content)
        {
            string str     = "/Storage/Plat/PageSettings/PageFoot";
            string mapPath = IOHelper.GetMapPath(str);

            content = HtmlContentHelper.TransferToLocalImage(content, IOHelper.GetMapPath("/"), mapPath, string.Concat(str, "/"));
            content = HtmlContentHelper.RemoveScriptsAndStyles(content);
            return(content);
        }
Exemplo n.º 3
0
        private string HTMLProcess(string content, long id)
        {
            string str     = string.Concat("/Storage/Plat/Article/", id);
            string mapPath = IOHelper.GetMapPath(str);

            content = HtmlContentHelper.TransferToLocalImage(content, IOHelper.GetMapPath("/"), mapPath, string.Concat(str, "/"));
            content = HtmlContentHelper.RemoveScriptsAndStyles(content);
            return(content);
        }
        private string HTMLProcess(string content, long id, long shopId)
        {
            string str     = string.Format("/Storage/Shop/{0}/templates/{1}", shopId, id);
            string mapPath = IOHelper.GetMapPath(str);

            content = HtmlContentHelper.TransferToLocalImage(content, IOHelper.GetMapPath("/"), mapPath, string.Concat(str, "/"));
            content = HtmlContentHelper.RemoveScriptsAndStyles(content);
            return(content);
        }
Exemplo n.º 5
0
 private string ProcessHtml(string html)
 {
     if (!string.IsNullOrEmpty(html))
     {
         string desDir = "/Storage/Plat/APP/About";
         html = HtmlContentHelper.TransferToLocalImage(html, "/", desDir, HimallIO.GetImagePath(desDir, null) + "/");
         html = HtmlContentHelper.RemoveScriptsAndStyles(html);
     }
     return(html);
 }