Skip to content

Commit 6047d23

Browse files
authored
Fixed the IsRooted method
Fixed the IsRooted method to include urls starting with "~/"
1 parent 4cab855 commit 6047d23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AbpCompanyName.AbpProjectName.WebMpa/Views/UrlChecker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public static class UrlChecker
88

99
public static bool IsRooted(string url)
1010
{
11-
if (url.StartsWith("/"))
11+
if (url.StartsWith("/") || url.StartsWith("~/"))
1212
{
1313
return true;
1414
}
@@ -21,4 +21,4 @@ public static bool IsRooted(string url)
2121
return false;
2222
}
2323
}
24-
}
24+
}

0 commit comments

Comments
 (0)