private static string ReplaceHtml(string html) { if (WebHelper.IsUseUISite) { string ui = AppConfig.GetApp("UI", string.Empty).ToLower(); if (!string.IsNullOrEmpty(ui)) { html = html.Replace(" src=\"/", " src=\"" + ui + "/").Replace(" src = \"/", " src = \"" + ui + "/").Replace(" src = '/", " src = '/" + ui + "/").Replace(" src='/", " src ='/" + ui + "/");; html = html.Replace(" href=\"/", " href=\"" + ui + "/").Replace(" href = \"/", " href = \"" + ui + "/").Replace(" href='/", " href='" + ui + "/").Replace(" href = '/", " href = '" + ui + "/"); } } //替换标签 if (html.IndexOf("${") > -1) { html = LangConst.ReplateHtmlLanguage(html); } return(html); }
public override void Update() { switch (TableName) { case "V_SYS_UserList": case "Sys_User": jsonResult = sysLogic.UpdateUser(); break; default: base.Update(); if (TableName == "Config_KeyValue") { if (KeyValueConfig.IsChangeLangConfig(GetID)) { LangConst.InitKeyValue(); //重新始始化多语言 } } break; } }
private static string ReplaceHtml(string html) { if (html.IndexOf("<meta name=\"Referrer\"") == -1)//safari浏览器的引用不完整。 { html = html.Replace("</head>", " <meta name=\"Referrer\" content=\"always\" />\n</head>"); } if (WebHelper.IsUseUISite) { string ui = AppConfig.GetApp("UI", string.Empty).ToLower(); if (!string.IsNullOrEmpty(ui)) { html = html.Replace(" src=\"/", " src=\"" + ui + "/").Replace(" src = \"/", " src = \"" + ui + "/").Replace(" src = '/", " src = '/" + ui + "/").Replace(" src='/", " src ='/" + ui + "/");; html = html.Replace(" href=\"/", " href=\"" + ui + "/").Replace(" href = \"/", " href = \"" + ui + "/").Replace(" href='/", " href='" + ui + "/").Replace(" href = '/", " href = '" + ui + "/"); } } //替换标签 if (html.IndexOf("${") > -1) { html = LangConst.ReplateHtmlLanguage(html); } return(html); }