#18740: Preventing link collision on "current" class

Work Item: 18740

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-06-29 16:35:53 -07:00
parent 65c67f23b9
commit 5a4cc39b97

View File

@@ -8,7 +8,7 @@ if (!HasText(Model.Text)) {
} else {
string requestUrl = Request.Path.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
string modelUrl = Model.Href.Replace(Request.ApplicationPath, string.Empty).TrimEnd('/').ToUpperInvariant();
if ((!string.IsNullOrEmpty(modelUrl) && requestUrl.StartsWith(modelUrl)) || requestUrl == modelUrl) {
if (requestUrl == modelUrl) {
Model.Classes.Add("current");
}
if(items.Any()) {