Beispiel #1
0
        public static string processUrl(string dxurl, string url)
        {
            string processdUrl = "";

            string[] _a = HtmlUtil.GetListByHtml(dxurl, url, "https?://.[^\"]+");
            if (_a.Length > 0)
            {
                processdUrl = _a[0];
            }
            else
            {
                processdUrl = "";
            }
            //处理含有单引号的链接
            processdUrl = HtmlUtil.UrlCl(processdUrl);

            //处理单引号的链接
            if (processdUrl.IndexOf("'") != -1 || processdUrl.IndexOf("\"") != -1)
            {
                processdUrl = HtmlUtil.GetstringByHtmlArray(processdUrl, "https?://.[^\']+");
            }
            return(processdUrl);
        }