Forbidding the use of backslashes in slugs.

work item: 16593

--HG--
branch : 1.x
This commit is contained in:
Nathan Heskew
2011-04-05 13:32:43 -07:00
parent dd210ab801
commit 48975f4ca4
3 changed files with 5 additions and 5 deletions

View File

@@ -72,7 +72,7 @@ namespace Orchard.Core.Tests.Routable.Services {
var thing = contentManager.Create<Thing>("thing", t => {
t.As<RoutePart>().Record = new RoutePartRecord();
t.Title = "Please do not use any of the following characters in your permalink: \":\", \"?\", \"#\", \"[\", \"]\", \"@\", \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\", \"\"\", \"<\", \">\"";
t.Title = "Please do not use any of the following characters in your permalink: \":\", \"?\", \"#\", \"[\", \"]\", \"@\", \"!\", \"$\", \"&\", \"'\", \"(\", \")\", \"*\", \"+\", \",\", \";\", \"=\", \"\"\", \"<\", \">\", \"\\\"";
});
_routableService.FillSlugFromTitle(thing.As<RoutePart>());
@@ -120,7 +120,7 @@ namespace Orchard.Core.Tests.Routable.Services {
public void InvalidCharacterShouldBeRefusedInSlugs() {
Assert.That(_routableService.IsSlugValid("aaaa-_aaaa"), Is.True);
foreach (var c in @":?#[]@!$&'()*+,;= ") {
foreach (var c in @":?#[]@!$&'()*+,;= \") {
Assert.That(_routableService.IsSlugValid("a" + c + "b"), Is.False);
}
}