Fixing a bug with "~/something/*" url's in the UrlRuleProvider

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-10-28 07:02:18 -07:00
parent 908a049b58
commit c8f90ab6c4
6 changed files with 104 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ namespace Orchard.Widgets.RuleEngine {
if (url != "/" && !url.Contains("?") && url.EndsWith("/"))
url = url.TrimEnd('/');
ruleContext.Result = url.EndsWith("*")
? context.Request.Path.ToUpperInvariant().StartsWith(url.ToUpperInvariant())
? context.Request.Path.ToUpperInvariant().StartsWith(url.TrimEnd('*').ToUpperInvariant())
: context.Request.Path.ToUpperInvariant() == url.ToUpperInvariant();
}
}