forked from Bremen/ESG
1
0
Fork 0
main
嘉祥 詹 2025-07-11 15:16:01 +08:00
parent 8ac3613937
commit 8df1957503
2 changed files with 10 additions and 5 deletions

View File

@ -153,10 +153,15 @@ namespace Bremen_ESG.Controllers
string err_msg = "";
if (GlobalClass.isURL(target_link) == false)
{
err_msg += "無有效結果連結\n";
}
//if (GlobalClass.isURL(target_link) == false)
//{
// err_msg += "無有效結果連結\n";
//}
//if (GlobalClass.isURL(target_link) == false)
//{
// err_msg += "無有效結果連結\n";
//}
if (target_email != "")
{

View File

@ -24,7 +24,7 @@ using System.Collections.Specialized;
public static class GlobalClass {
public static IServiceProvider ServiceProvider;
public static bool isURL(string url) {
return Uri.IsWellFormedUriString(url, UriKind.Absolute);
return Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute);
}
public static string GetIP(this HttpContext context) {