From 7c8d6599408052285b93fe3b65a68a717db593a0 Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Wed, 1 Dec 2010 22:38:21 -0800
Subject: [PATCH 01/20] Giving the checkbox and radio inputs in the admin a
little focus outline
--HG--
branch : dev
---
src/Orchard.Web/Themes/TheAdmin/Styles/site.css | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css
index e8fdc6504..293b3de49 100644
--- a/src/Orchard.Web/Themes/TheAdmin/Styles/site.css
+++ b/src/Orchard.Web/Themes/TheAdmin/Styles/site.css
@@ -58,7 +58,6 @@ blockquote, q { quotes: "" ""; }
header, footer, aside, nav, article { display: block; }
/* end: reset */
-
/* Clearing Floats
***************************************************************/
@@ -460,6 +459,10 @@ form.inline fieldset {
padding-top:0;
}
+input[type="checkbox"]:focus, input[type="radio"]:focus {
+ outline:1px dotted #666d51;
+}
+
legend span {
font-weight:normal;
}
From a13494030599113e777739289d9368a5f60fc32d Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Wed, 1 Dec 2010 22:38:54 -0800
Subject: [PATCH 02/20] Updating a blog spec test to rearrange the workflow
--HG--
branch : dev
---
src/Orchard.Specs/Blogs.feature | 12 ++++++------
src/Orchard.Specs/Blogs.feature.cs | 24 ++++++++++++------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/Orchard.Specs/Blogs.feature b/src/Orchard.Specs/Blogs.feature
index 7d2a60a27..cc773d77f 100644
--- a/src/Orchard.Specs/Blogs.feature
+++ b/src/Orchard.Specs/Blogs.feature
@@ -15,18 +15,18 @@ Scenario: I can create a new blog and blog post
| name | value |
| Routable.Title | My Blog |
And I hit "Save"
- And I go to "my-blog"
- Then I should see "
]*>.*?My Blog.*?
"
- When I go to "admin/blogs"
+ And I go to "admin/blogs"
And I follow "My Blog"
- Then I should see "foo"
- When I follow "New Post"
+ And I follow "New Post"
And I fill in
| name | value |
| Routable.Title | My Post |
| Body.Text | Hi there. |
And I hit "Publish Now"
- And I go to "my-blog/my-post"
+ And I go to "my-blog"
+ Then I should see "
]*>.*?My Blog.*?
"
+ And I should see "
]*>.*?My Post.*?
"
+ When I go to "my-blog/my-post"
Then I should see "
]*>.*?My Post.*?
"
And I should see "Hi there."
diff --git a/src/Orchard.Specs/Blogs.feature.cs b/src/Orchard.Specs/Blogs.feature.cs
index 619696117..47fef6b10 100644
--- a/src/Orchard.Specs/Blogs.feature.cs
+++ b/src/Orchard.Specs/Blogs.feature.cs
@@ -93,17 +93,11 @@ this.ScenarioSetup(scenarioInfo);
#line 17
testRunner.And("I hit \"Save\"");
#line 18
- testRunner.And("I go to \"my-blog\"");
+ testRunner.And("I go to \"admin/blogs\"");
#line 19
- testRunner.Then("I should see \"
]*>.*?My Blog.*?
\"");
-#line 20
- testRunner.When("I go to \"admin/blogs\"");
-#line 21
testRunner.And("I follow \"My Blog\"");
-#line 22
- testRunner.Then("I should see \"foo\"");
-#line 23
- testRunner.When("I follow \"New Post\"");
+#line 20
+ testRunner.And("I follow \"New Post\"");
#line hidden
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
"name",
@@ -114,12 +108,18 @@ this.ScenarioSetup(scenarioInfo);
table2.AddRow(new string[] {
"Body.Text",
"Hi there."});
-#line 24
+#line 21
testRunner.And("I fill in", ((string)(null)), table2);
-#line 28
+#line 25
testRunner.And("I hit \"Publish Now\"");
+#line 26
+ testRunner.And("I go to \"my-blog\"");
+#line 27
+ testRunner.Then("I should see \"
]*>.*?My Blog.*?
\"");
+#line 28
+ testRunner.And("I should see \"
]*>.*?My Post.*?
\"");
#line 29
- testRunner.And("I go to \"my-blog/my-post\"");
+ testRunner.When("I go to \"my-blog/my-post\"");
#line 30
testRunner.Then("I should see \"
]*>.*?My Post.*?
\"");
#line 31
From fd6dc8b92bd26f5b45d9e0fa74a11dad4df1f24e Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Wed, 1 Dec 2010 23:59:10 -0800
Subject: [PATCH 03/20] Making it so multiple warning messages don't appear
when creating a new container enabled content item (messages which appear
when there are no containable enabled content types in the system)
work item: 16905
--HG--
branch : dev
---
.../Core/Containers/Drivers/ContainerPartDriver.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/Orchard.Web/Core/Containers/Drivers/ContainerPartDriver.cs b/src/Orchard.Web/Core/Containers/Drivers/ContainerPartDriver.cs
index 0cd207dde..f95aaa13f 100644
--- a/src/Orchard.Web/Core/Containers/Drivers/ContainerPartDriver.cs
+++ b/src/Orchard.Web/Core/Containers/Drivers/ContainerPartDriver.cs
@@ -35,16 +35,16 @@ namespace Orchard.Core.Containers.Drivers {
}
protected override DriverResult Editor(ContainerPart part, dynamic shapeHelper) {
- return Editor(part, null, shapeHelper);
- }
-
- protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
// if there are no containable items then show a nice little warning
if (!_contentDefinitionManager.ListTypeDefinitions()
.Where(typeDefinition => typeDefinition.Parts.Any(partDefinition => partDefinition.PartDefinition.Name == "ContainablePart")).Any()) {
Services.Notifier.Warning(T("There are no content types in the system with a Containable part attached. Consider adding a Containable part to some content type, existing or new, in order to relate items to this (Container enabled) item."));
}
+ return Editor(part, null, shapeHelper);
+ }
+
+ protected override DriverResult Editor(ContainerPart part, IUpdateModel updater, dynamic shapeHelper) {
return ContentShape(
"Parts_Container_Edit",
() => {
From bf005f20a232f2d81a80a8cc25971a8c4ffd6890 Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Thu, 2 Dec 2010 07:30:33 -0800
Subject: [PATCH 04/20] Cleaning up some string extension methods
--HG--
branch : dev
---
.../Utility/Extensions/StringExtensions.cs | 20 ++++++++-----------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/Orchard/Utility/Extensions/StringExtensions.cs b/src/Orchard/Utility/Extensions/StringExtensions.cs
index d0a760210..b9bdaa0ff 100644
--- a/src/Orchard/Utility/Extensions/StringExtensions.cs
+++ b/src/Orchard/Utility/Extensions/StringExtensions.cs
@@ -6,8 +6,8 @@ namespace Orchard.Utility.Extensions {
public static class StringExtensions {
private static readonly Regex humps = new Regex("(?:^[a-zA-Z][^A-Z]*|[A-Z][^A-Z]*)");
public static string CamelFriendly(this string camel) {
- if (camel == null)
- return null;
+ if (string.IsNullOrWhiteSpace(camel))
+ return "";
var matches = humps.Matches(camel).OfType().Select(m => m.Value);
return matches.Any()
@@ -20,17 +20,16 @@ namespace Orchard.Utility.Extensions {
}
public static string Ellipsize(this string text, int characterCount, string ellipsis) {
- var cleanTailRegex = new Regex(@"\s+\S*$");
+ if (string.IsNullOrWhiteSpace(text) || characterCount < 0 || text.Length <= characterCount)
+ return "";
- if (string.IsNullOrEmpty(text) || characterCount < 0 || text.Length <= characterCount)
- return text;
-
- return cleanTailRegex.Replace(text.Substring(0, characterCount + 1), "") + ellipsis;
+ return Regex.Replace(text.Substring(0, characterCount + 1), @"\s+\S*$", "") + ellipsis;
}
public static string HtmlClassify(this string text) {
if (string.IsNullOrWhiteSpace(text))
- return text;
+ return "";
+
var friendlier = text.CamelFriendly();
return Regex.Replace(friendlier, @"[^a-zA-Z]+", m => m.Index == 0 ? "" : "-").ToLowerInvariant();
}
@@ -42,10 +41,7 @@ namespace Orchard.Utility.Extensions {
}
public static string RemoveTags(this string html) {
- var tagRegex = new Regex("<[^<>]*>", RegexOptions.Singleline);
- var text = tagRegex.Replace(html, "");
-
- return text;
+ return Regex.Replace(html, "<[^<>]*>", "", RegexOptions.Singleline);
}
}
}
\ No newline at end of file
From 8efaf1ca208d22ab0fcb28addba953164d7eec7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Ros?=
Date: Thu, 2 Dec 2010 08:10:32 -0800
Subject: [PATCH 05/20] Renaming ContainerCustomPart to CustomProperties
--HG--
branch : dev
---
.../Drivers/ContainerCustomPartDriver.cs | 30 -------------
.../Drivers/ContainerWidgetPartDriver.cs | 2 +-
.../Drivers/CustomPropertiesDriver.cs | 30 +++++++++++++
.../Extensions/ContentQueryExtensions.cs | 42 +++++++++----------
src/Orchard.Web/Core/Containers/Migrations.cs | 4 +-
...rCustomPart.cs => CustomPropertiesPart.cs} | 4 +-
.../Core/Containers/Placement.info | 2 +-
.../Views/EditorTemplates/Container.cshtml | 6 +--
.../EditorTemplates/ContainerWidget.cshtml | 12 +++---
...rCustom.cshtml => CustomProperties.cshtml} | 2 +-
src/Orchard.Web/Core/Orchard.Core.csproj | 6 +--
11 files changed, 70 insertions(+), 70 deletions(-)
delete mode 100644 src/Orchard.Web/Core/Containers/Drivers/ContainerCustomPartDriver.cs
create mode 100644 src/Orchard.Web/Core/Containers/Drivers/CustomPropertiesDriver.cs
rename src/Orchard.Web/Core/Containers/Models/{ContainerCustomPart.cs => CustomPropertiesPart.cs} (65%)
rename src/Orchard.Web/Core/Containers/Views/EditorTemplates/{ContainerCustom.cshtml => CustomProperties.cshtml} (84%)
diff --git a/src/Orchard.Web/Core/Containers/Drivers/ContainerCustomPartDriver.cs b/src/Orchard.Web/Core/Containers/Drivers/ContainerCustomPartDriver.cs
deleted file mode 100644
index fb2ac6767..000000000
--- a/src/Orchard.Web/Core/Containers/Drivers/ContainerCustomPartDriver.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Orchard.ContentManagement;
-using Orchard.ContentManagement.Drivers;
-using Orchard.ContentManagement.Handlers;
-using Orchard.Core.Containers.Models;
-using Orchard.Data;
-
-namespace Orchard.Core.Containers.Drivers {
- public class ContainerCustomPartDriver : ContentPartDriver {
- protected override DriverResult Editor(ContainerCustomPart part, dynamic shapeHelper) {
- return Editor(part, null, shapeHelper);
- }
-
- protected override DriverResult Editor(ContainerCustomPart part, IUpdateModel updater, dynamic shapeHelper) {
- return ContentShape(
- "Parts_ContainerCustom_Edit",
- () => {
- if (updater != null)
- updater.TryUpdateModel(part, "ContainerCustom", null, null);
-
- return shapeHelper.EditorTemplate(TemplateName: "ContainerCustom", Model: part, Prefix: "ContainerCustom");
- });
- }
- }
-
- public class ContainerCustomPartHandler : ContentHandler {
- public ContainerCustomPartHandler(IRepository repository) {
- Filters.Add(StorageFilter.For(repository));
- }
- }
-}
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs b/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs
index d02f5f33a..fc107513c 100644
--- a/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs
+++ b/src/Orchard.Web/Core/Containers/Drivers/ContainerWidgetPartDriver.cs
@@ -86,7 +86,7 @@ namespace Orchard.Core.Containers.Drivers {
part.Record.PageSize = 5;
part.Record.OrderByProperty = part.Is() ? "CommonPart.PublishedUtc" : "";
part.Record.OrderByDirection = (int)OrderByDirection.Descending;
- part.Record.FilterByProperty = "ContainerCustomPart.CustomOne";
+ part.Record.FilterByProperty = "CustomPropertiesPart.CustomOne";
part.Record.FilterByOperator = "=";
});
}
diff --git a/src/Orchard.Web/Core/Containers/Drivers/CustomPropertiesDriver.cs b/src/Orchard.Web/Core/Containers/Drivers/CustomPropertiesDriver.cs
new file mode 100644
index 000000000..8a7bda0aa
--- /dev/null
+++ b/src/Orchard.Web/Core/Containers/Drivers/CustomPropertiesDriver.cs
@@ -0,0 +1,30 @@
+using Orchard.ContentManagement;
+using Orchard.ContentManagement.Drivers;
+using Orchard.ContentManagement.Handlers;
+using Orchard.Core.Containers.Models;
+using Orchard.Data;
+
+namespace Orchard.Core.Containers.Drivers {
+ public class CustomPropertiesPartDriver : ContentPartDriver {
+ protected override DriverResult Editor(CustomPropertiesPart part, dynamic shapeHelper) {
+ return Editor(part, null, shapeHelper);
+ }
+
+ protected override DriverResult Editor(CustomPropertiesPart part, IUpdateModel updater, dynamic shapeHelper) {
+ return ContentShape(
+ "Parts_CustomProperties_Edit",
+ () => {
+ if (updater != null)
+ updater.TryUpdateModel(part, "CustomProperties", null, null);
+
+ return shapeHelper.EditorTemplate(TemplateName: "CustomProperties", Model: part, Prefix: "CustomProperties");
+ });
+ }
+ }
+
+ public class CustomPropertiesPartHandler : ContentHandler {
+ public CustomPropertiesPartHandler(IRepository repository) {
+ Filters.Add(StorageFilter.For(repository));
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Containers/Extensions/ContentQueryExtensions.cs b/src/Orchard.Web/Core/Containers/Extensions/ContentQueryExtensions.cs
index d11e033ce..e2ba45a03 100644
--- a/src/Orchard.Web/Core/Containers/Extensions/ContentQueryExtensions.cs
+++ b/src/Orchard.Web/Core/Containers/Extensions/ContentQueryExtensions.cs
@@ -21,20 +21,20 @@ namespace Orchard.Core.Containers.Extensions
? query.OrderByDescending(record => record.Slug)
: query.OrderBy(record => record.Slug);
break;
- case "ContainerCustomPart.CustomOne":
+ case "CustomPropertiesPart.CustomOne":
query = descendingOrder
- ? query.OrderByDescending(record => record.CustomOne)
- : query.OrderBy(record => record.CustomOne);
+ ? query.OrderByDescending(record => record.CustomOne)
+ : query.OrderBy(record => record.CustomOne);
break;
- case "ContainerCustomPart.CustomTwo":
+ case "CustomPropertiesPart.CustomTwo":
query = descendingOrder
- ? query.OrderByDescending(record => record.CustomTwo)
- : query.OrderBy(record => record.CustomTwo);
+ ? query.OrderByDescending(record => record.CustomTwo)
+ : query.OrderBy(record => record.CustomTwo);
break;
- case "ContainerCustomPart.CustomThree":
+ case "CustomPropertiesPart.CustomThree":
query = descendingOrder
- ? query.OrderByDescending(record => record.CustomThree)
- : query.OrderBy(record => record.CustomThree);
+ ? query.OrderByDescending(record => record.CustomThree)
+ : query.OrderBy(record => record.CustomThree);
break;
default: // "CommonPart.PublishedUtc"
query = descendingOrder
@@ -69,18 +69,18 @@ namespace Orchard.Core.Containers.Extensions
{"CommonPart.PublishedUtc|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.PublishedUtc == DateTime.Parse(s)))}, // todo: (heskew) not practical as is. needs some sense of precision....
{"CommonPart.PublishedUtc|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* can't modified PublishedUtc for partial comparisons */))},
// todo: (hesekw) this could benefit from a better filter implementation as this is currently very limited in functionality and I have no idea how the custom parts will be used by folks
- {"ContainerCustomPart.CustomOne|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomOne.CompareTo(s) == -1*/))},
- {"ContainerCustomPart.CustomOne|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomOne.CompareTo(s) == 1*/))},
- {"ContainerCustomPart.CustomOne|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomOne.Equals(s, StringComparison.OrdinalIgnoreCase)))},
- {"ContainerCustomPart.CustomOne|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomOne.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
- {"ContainerCustomPart.CustomTwo|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomTwo.CompareTo(s) == -1*/))},
- {"ContainerCustomPart.CustomTwo|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomTwo.CompareTo(s) == 1*/))},
- {"ContainerCustomPart.CustomTwo|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomTwo.Equals(s, StringComparison.OrdinalIgnoreCase)))},
- {"ContainerCustomPart.CustomTwo|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomTwo.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
- {"ContainerCustomPart.CustomThree|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomThree.CompareTo(s) == -1*/))},
- {"ContainerCustomPart.CustomThree|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomThree.CompareTo(s) == 1*/))},
- {"ContainerCustomPart.CustomThree|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomThree.Equals(s, StringComparison.OrdinalIgnoreCase)))},
- {"ContainerCustomPart.CustomThree|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomThree.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomOne|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomOne.CompareTo(s) == -1*/))},
+ {"CustomPropertiesPart.CustomOne|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomOne.CompareTo(s) == 1*/))},
+ {"CustomPropertiesPart.CustomOne|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomOne.Equals(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomOne|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomOne.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomTwo|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomTwo.CompareTo(s) == -1*/))},
+ {"CustomPropertiesPart.CustomTwo|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomTwo.CompareTo(s) == 1*/))},
+ {"CustomPropertiesPart.CustomTwo|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomTwo.Equals(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomTwo|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomTwo.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomThree|<", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomThree.CompareTo(s) == -1*/))},
+ {"CustomPropertiesPart.CustomThree|>", new Func, string, IContentQuery>((q, s) => q.Where(r => true /* CompareTo is not implemented - r.CustomThree.CompareTo(s) == 1*/))},
+ {"CustomPropertiesPart.CustomThree|=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomThree.Equals(s, StringComparison.OrdinalIgnoreCase)))},
+ {"CustomPropertiesPart.CustomThree|^=", new Func, string, IContentQuery>((q, s) => q.Where(r => r.CustomThree.StartsWith(s, StringComparison.OrdinalIgnoreCase)))},
};
}
}
\ No newline at end of file
diff --git a/src/Orchard.Web/Core/Containers/Migrations.cs b/src/Orchard.Web/Core/Containers/Migrations.cs
index decb6f714..4a91eaec6 100644
--- a/src/Orchard.Web/Core/Containers/Migrations.cs
+++ b/src/Orchard.Web/Core/Containers/Migrations.cs
@@ -25,7 +25,7 @@ namespace Orchard.Core.Containers {
.Column("FilterByOperator")
.Column("FilterByValue"));
- SchemaBuilder.CreateTable("ContainerCustomPartRecord",
+ SchemaBuilder.CreateTable("CustomPropertiesPartRecord",
table => table
.ContentPartRecord()
.Column("CustomOne")
@@ -41,7 +41,7 @@ namespace Orchard.Core.Containers {
ContentDefinitionManager.AlterPartDefinition("ContainerPart", builder => builder.Attachable());
ContentDefinitionManager.AlterPartDefinition("ContainablePart", builder => builder.Attachable());
- ContentDefinitionManager.AlterPartDefinition("ContainerCustomPart", builder => builder.Attachable());
+ ContentDefinitionManager.AlterPartDefinition("CustomPropertiesPart", builder => builder.Attachable());
return 1;
}
diff --git a/src/Orchard.Web/Core/Containers/Models/ContainerCustomPart.cs b/src/Orchard.Web/Core/Containers/Models/CustomPropertiesPart.cs
similarity index 65%
rename from src/Orchard.Web/Core/Containers/Models/ContainerCustomPart.cs
rename to src/Orchard.Web/Core/Containers/Models/CustomPropertiesPart.cs
index a6a33965c..51afdcac3 100644
--- a/src/Orchard.Web/Core/Containers/Models/ContainerCustomPart.cs
+++ b/src/Orchard.Web/Core/Containers/Models/CustomPropertiesPart.cs
@@ -2,10 +2,10 @@
using Orchard.ContentManagement.Records;
namespace Orchard.Core.Containers.Models {
- public class ContainerCustomPart : ContentPart {
+ public class CustomPropertiesPart : ContentPart {
}
- public class ContainerCustomPartRecord : ContentPartRecord {
+ public class CustomPropertiesPartRecord : ContentPartRecord {
public virtual string CustomOne { get; set; }
public virtual string CustomTwo { get; set; }
public virtual string CustomThree { get; set; }
diff --git a/src/Orchard.Web/Core/Containers/Placement.info b/src/Orchard.Web/Core/Containers/Placement.info
index b98c878cd..17d6f76a9 100644
--- a/src/Orchard.Web/Core/Containers/Placement.info
+++ b/src/Orchard.Web/Core/Containers/Placement.info
@@ -7,7 +7,7 @@
-->
-
+
diff --git a/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml b/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml
index e321e9841..d9cc0c7d2 100644
--- a/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml
+++ b/src/Orchard.Web/Core/Containers/Views/EditorTemplates/Container.cshtml
@@ -6,9 +6,9 @@
@Html.SelectOption(Model.Record.OrderByProperty, "CommonPart.PublishedUtc", T("Date Published").Text)
@Html.SelectOption(Model.Record.OrderByProperty, "RoutePart.Title", T("Title").Text)
@Html.SelectOption(Model.Record.OrderByProperty, "RoutePart.Slug", T("Slug").Text)
- @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomOne", T("Custom 1").Text)
- @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomTwo", T("Custom 2").Text)
- @Html.SelectOption(Model.Record.OrderByProperty, "ContainerCustomPart.CustomThree", T("Custom 3").Text)
+ @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomOne", T("Custom 1").Text)
+ @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomTwo", T("Custom 2").Text)
+ @Html.SelectOption(Model.Record.OrderByProperty, "CustomPropertiesPart.CustomThree", T("Custom 3").Text)
$1
"), Is.StringMatching("Lorem ipsum dolor sit amet, consectetur adipiscing elit.
\r\n
Maecenas sed purus quis purus orci aliquam."));
+ }
+ [Test]
+ public void ReplaceNewLinesWith_EmptyStringReturnsEmptyString() {
+ const string lotsOfLineFeeds = "";
+ Assert.That(lotsOfLineFeeds.ReplaceNewLinesWith(" "), Is.StringMatching(""));
+ }
+ [Test]
+ public void ReplaceNewLinesWith_NullValueReturnsEmptyString() {
+ const string lotsOfLineFeeds = null;
+ Assert.That(lotsOfLineFeeds.ReplaceNewLinesWith(" "), Is.StringMatching(""));
+ }
}
}
diff --git a/src/Orchard/Utility/Extensions/StringExtensions.cs b/src/Orchard/Utility/Extensions/StringExtensions.cs
index b9bdaa0ff..bc1225b1e 100644
--- a/src/Orchard/Utility/Extensions/StringExtensions.cs
+++ b/src/Orchard/Utility/Extensions/StringExtensions.cs
@@ -20,8 +20,11 @@ namespace Orchard.Utility.Extensions {
}
public static string Ellipsize(this string text, int characterCount, string ellipsis) {
- if (string.IsNullOrWhiteSpace(text) || characterCount < 0 || text.Length <= characterCount)
+ if (string.IsNullOrWhiteSpace(text))
return "";
+
+ if (characterCount < 0 || text.Length <= characterCount)
+ return text;
return Regex.Replace(text.Substring(0, characterCount + 1), @"\s+\S*$", "") + ellipsis;
}
@@ -41,7 +44,16 @@ namespace Orchard.Utility.Extensions {
}
public static string RemoveTags(this string html) {
- return Regex.Replace(html, "<[^<>]*>", "", RegexOptions.Singleline);
+ return string.IsNullOrEmpty(html)
+ ? ""
+ : Regex.Replace(html, "<[^<>]*>", "", RegexOptions.Singleline);
+ }
+
+ // not accounting for only \r (e.g. Apple OS 9 carriage return only new lines)
+ public static string ReplaceNewLinesWith(this string text, string replacement) {
+ return string.IsNullOrWhiteSpace(text)
+ ? ""
+ : Regex.Replace(text, @"(\r?\n)", replacement, RegexOptions.Singleline);
}
}
}
\ No newline at end of file
From 4762b1d3f6906d04dd5416a5d64bf5afb277b59d Mon Sep 17 00:00:00 2001
From: Dave Reed
Date: Thu, 2 Dec 2010 12:32:15 -0800
Subject: [PATCH 10/20] #16906: You can no longer add fields with an empty name
--HG--
branch : dev
---
.../Controllers/AdminController.cs | 13 ++++++++++---
.../Services/ContentDefinitionService.cs | 8 +++++---
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs
index 8956266f8..4617215a7 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Controllers/AdminController.cs
@@ -326,8 +326,8 @@ namespace Orchard.ContentTypes.Controllers {
if (partViewModel == null) {
//id passed in might be that of a type w/ no implicit field
if (typeViewModel != null) {
- partViewModel = new EditPartViewModel { Name = typeViewModel.Name };
- _contentDefinitionService.AddPart(new CreatePartViewModel { Name = partViewModel.Name });
+ partViewModel = new EditPartViewModel {Name = typeViewModel.Name};
+ _contentDefinitionService.AddPart(new CreatePartViewModel {Name = partViewModel.Name});
_contentDefinitionService.AddPartToType(partViewModel.Name, typeViewModel.Name);
}
else {
@@ -341,7 +341,14 @@ namespace Orchard.ContentTypes.Controllers {
return AddFieldTo(id);
}
- _contentDefinitionService.AddFieldToPart(viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name);
+ try {
+ _contentDefinitionService.AddFieldToPart(viewModel.DisplayName, viewModel.FieldTypeName, partViewModel.Name);
+ }
+ catch (Exception ex) {
+ Services.Notifier.Information(T("The \"{0}\" field was not added. {1}", viewModel.DisplayName, ex.Message));
+ Services.TransactionManager.Cancel();
+ return AddFieldTo(id);
+ }
if (!ModelState.IsValid) {
Services.TransactionManager.Cancel();
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs b/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs
index 39fe4567a..d00d99d7b 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Services/ContentDefinitionService.cs
@@ -210,9 +210,11 @@ namespace Orchard.ContentTypes.Services {
public void AddFieldToPart(string fieldName, string fieldTypeName, string partName) {
fieldName = SafeName(fieldName);
- _contentDefinitionManager.AlterPartDefinition(partName, partBuilder =>
- partBuilder.WithField(fieldName, fieldBuilder => fieldBuilder.OfType(fieldTypeName))
- );
+ if (string.IsNullOrEmpty(fieldName)) {
+ throw new OrchardException(T("Fields must have a name containing no spaces or symbols."));
+ }
+ _contentDefinitionManager.AlterPartDefinition(partName,
+ partBuilder => partBuilder.WithField(fieldName, fieldBuilder => fieldBuilder.OfType(fieldTypeName)));
}
public void RemoveFieldFromPart(string fieldName, string partName) {
From fb82b122f8171e6a658b5fa7c121163255d70ea2 Mon Sep 17 00:00:00 2001
From: Louis DeJardin
Date: Thu, 2 Dec 2010 12:42:12 -0800
Subject: [PATCH 11/20] Fixing unit tests
Registering WorkContextModule to allow it to register the components it will use internally
--HG--
branch : dev
extra : rebase_source : 82c6712e0b465f57d080f751e36f5cc41a2158b9
---
src/Orchard.Tests/ContainerTestBase.cs | 16 +++++++++++++++-
.../Descriptors/PlacementFileParserTests.cs | 2 +-
.../ShapeAttributeBindingStrategyTests.cs | 2 +-
.../ShapeTemplateBindingStrategyTests.cs | 2 +-
.../DefaultWorkContextAccessorTests.cs | 3 ++-
.../DefaultShellContextFactoryTests.cs | 1 +
.../State/DefaultProcessingEngineTests.cs | 1 +
src/Orchard.Tests/Mvc/Routes/ShellRouteTests.cs | 1 +
src/Orchard.Tests/Tasks/SweepGeneratorTests.cs | 1 +
src/Orchard.Tests/UI/ShapeTests.cs | 2 +-
src/Orchard.Tests/Utility/ContainerExtensions.cs | 2 +-
11 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/src/Orchard.Tests/ContainerTestBase.cs b/src/Orchard.Tests/ContainerTestBase.cs
index 37aee70e8..18625dbad 100644
--- a/src/Orchard.Tests/ContainerTestBase.cs
+++ b/src/Orchard.Tests/ContainerTestBase.cs
@@ -14,7 +14,21 @@ namespace Orchard.Tests {
Resolve(_container);
}
+#if false
+ // technically more accurate, and doesn't work
+ [SetUp]
+ public virtual void Init() {
+ var hostBuilder = new ContainerBuilder();
+ var hostContainer = hostBuilder.Build();
+ var shellContainer = hostContainer.BeginLifetimeScope("shell", shellBuilder => Register(shellBuilder));
+ var workContainer = shellContainer.BeginLifetimeScope("work");
+
+ _container = workContainer;
+ Resolve(_container);
+ }
+#endif
+
protected virtual void Register(ContainerBuilder builder) { }
- protected virtual void Resolve(IContainer container) { }
+ protected virtual void Resolve(ILifetimeScope container) { }
}
}
\ No newline at end of file
diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/PlacementFileParserTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/PlacementFileParserTests.cs
index 899617170..b48a4d97c 100644
--- a/src/Orchard.Tests/DisplayManagement/Descriptors/PlacementFileParserTests.cs
+++ b/src/Orchard.Tests/DisplayManagement/Descriptors/PlacementFileParserTests.cs
@@ -21,7 +21,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
}
- protected override void Resolve(IContainer container) {
+ protected override void Resolve(ILifetimeScope container) {
_parser = container.Resolve();
_folder = container.Resolve();
}
diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs
index 4fe4ebd98..29039308d 100644
--- a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs
+++ b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeAttributeBindingStrategyTests.cs
@@ -39,7 +39,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
builder.RegisterModule(new ShapeAttributeBindingModule());
}
- protected override void Resolve(IContainer container) {
+ protected override void Resolve(ILifetimeScope container) {
// implementation resorts to orchard host to resolve "current scope" services
container.Resolve>()
.Setup(x => x.Resolve())
diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeTemplateBindingStrategyTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeTemplateBindingStrategyTests.cs
index 4663a30de..ec16aa7cb 100644
--- a/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeTemplateBindingStrategyTests.cs
+++ b/src/Orchard.Tests/DisplayManagement/Descriptors/ShapeTemplateBindingStrategyTests.cs
@@ -97,7 +97,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors {
}
}
- protected override void Resolve(IContainer container) {
+ protected override void Resolve(ILifetimeScope container) {
_features = new List();
container.Resolve>()
diff --git a/src/Orchard.Tests/Environment/DefaultWorkContextAccessorTests.cs b/src/Orchard.Tests/Environment/DefaultWorkContextAccessorTests.cs
index 5de77cf97..5f596f140 100644
--- a/src/Orchard.Tests/Environment/DefaultWorkContextAccessorTests.cs
+++ b/src/Orchard.Tests/Environment/DefaultWorkContextAccessorTests.cs
@@ -22,11 +22,12 @@ namespace Orchard.Tests.Environment {
}
protected override void Register(ContainerBuilder builder) {
+ builder.RegisterModule(new WorkContextModule());
builder.RegisterType().As();
builder.RegisterAutoMocking();
}
- protected override void Resolve(IContainer container) {
+ protected override void Resolve(ILifetimeScope container) {
container.Mock()
.Setup(x => x.Current())
.Returns(() => _httpContextCurrent);
diff --git a/src/Orchard.Tests/Environment/ShellBuilders/DefaultShellContextFactoryTests.cs b/src/Orchard.Tests/Environment/ShellBuilders/DefaultShellContextFactoryTests.cs
index 4857f4b72..4fe63021e 100644
--- a/src/Orchard.Tests/Environment/ShellBuilders/DefaultShellContextFactoryTests.cs
+++ b/src/Orchard.Tests/Environment/ShellBuilders/DefaultShellContextFactoryTests.cs
@@ -21,6 +21,7 @@ namespace Orchard.Tests.Environment.ShellBuilders {
public void Init() {
var builder = new ContainerBuilder();
builder.RegisterType().As();
+ builder.RegisterModule(new WorkContextModule());
builder.RegisterType().As();
builder.RegisterAutoMocking(Moq.MockBehavior.Strict);
_container = builder.Build();
diff --git a/src/Orchard.Tests/Environment/State/DefaultProcessingEngineTests.cs b/src/Orchard.Tests/Environment/State/DefaultProcessingEngineTests.cs
index d564bb24c..737d896ef 100644
--- a/src/Orchard.Tests/Environment/State/DefaultProcessingEngineTests.cs
+++ b/src/Orchard.Tests/Environment/State/DefaultProcessingEngineTests.cs
@@ -23,6 +23,7 @@ namespace Orchard.Tests.Environment.State {
public void Init() {
var builder = new ContainerBuilder();
builder.RegisterType().As();
+ builder.RegisterModule(new WorkContextModule());
builder.RegisterType().As();
builder.RegisterAutoMocking();
_container = builder.Build();
diff --git a/src/Orchard.Tests/Mvc/Routes/ShellRouteTests.cs b/src/Orchard.Tests/Mvc/Routes/ShellRouteTests.cs
index 33bbfb968..cf3663fd7 100644
--- a/src/Orchard.Tests/Mvc/Routes/ShellRouteTests.cs
+++ b/src/Orchard.Tests/Mvc/Routes/ShellRouteTests.cs
@@ -36,6 +36,7 @@ namespace Orchard.Tests.Mvc.Routes {
rootBuilder.Register(ctx => _routes);
rootBuilder.RegisterType().InstancePerDependency();
rootBuilder.RegisterType().As().SingleInstance();
+ rootBuilder.RegisterModule(new WorkContextModule());
rootBuilder.RegisterType().As().InstancePerMatchingLifetimeScope("shell");
rootBuilder.RegisterType().As();
diff --git a/src/Orchard.Tests/Tasks/SweepGeneratorTests.cs b/src/Orchard.Tests/Tasks/SweepGeneratorTests.cs
index 9bb99fa08..cdb2c2471 100644
--- a/src/Orchard.Tests/Tasks/SweepGeneratorTests.cs
+++ b/src/Orchard.Tests/Tasks/SweepGeneratorTests.cs
@@ -12,6 +12,7 @@ namespace Orchard.Tests.Tasks {
public class SweepGeneratorTests : ContainerTestBase {
protected override void Register(ContainerBuilder builder) {
builder.RegisterAutoMocking(MockBehavior.Loose);
+ builder.RegisterModule(new WorkContextModule());
builder.RegisterType().As();
builder.RegisterType();
}
diff --git a/src/Orchard.Tests/UI/ShapeTests.cs b/src/Orchard.Tests/UI/ShapeTests.cs
index efac540ea..202f2b59d 100644
--- a/src/Orchard.Tests/UI/ShapeTests.cs
+++ b/src/Orchard.Tests/UI/ShapeTests.cs
@@ -29,7 +29,7 @@ namespace Orchard.Tests.UI {
throw new NotImplementedException("this test fixture needs to move to modules tests now");
}
- protected override void Resolve(IContainer container) {
+ protected override void Resolve(ILifetimeScope container) {
_workContext = container.Resolve().CreateWorkContextScope().WorkContext;
}
diff --git a/src/Orchard.Tests/Utility/ContainerExtensions.cs b/src/Orchard.Tests/Utility/ContainerExtensions.cs
index d95bcef2a..ae6b632b8 100644
--- a/src/Orchard.Tests/Utility/ContainerExtensions.cs
+++ b/src/Orchard.Tests/Utility/ContainerExtensions.cs
@@ -9,7 +9,7 @@ using Moq;
namespace Orchard.Tests.Utility {
public static class ContainerExtensions {
- public static Mock Mock(this IContainer container) where T : class {
+ public static Mock Mock(this IComponentContext container) where T : class {
return container.Resolve>();
}
From d86fb19308e44731806d1de92e425d719330553f Mon Sep 17 00:00:00 2001
From: Dave Reed
Date: Thu, 2 Dec 2010 13:22:32 -0800
Subject: [PATCH 12/20] #16922: Added webpages:Enabled=false to web.configs
--HG--
branch : dev
---
src/Orchard.Specs/Hosting/Orchard.Web/Core/Web.config | 3 +++
src/Orchard.Specs/Hosting/Orchard.Web/Themes/Web.config | 3 +++
src/Orchard.Specs/Hosting/Orchard.Web/Web.config | 4 +++-
src/Orchard.Specs/Hosting/Simple.Web/Web.config | 4 +++-
src/Orchard.Web/Core/Common/Views/Web.config | 3 +++
src/Orchard.Web/Core/Contents/Views/Web.config | 3 +++
src/Orchard.Web/Core/Dashboard/Views/Web.config | 3 +++
src/Orchard.Web/Core/Navigation/Views/Web.config | 3 +++
src/Orchard.Web/Core/Reports/Views/Web.config | 3 +++
src/Orchard.Web/Core/Routable/Scripts/Web.config | 3 +++
src/Orchard.Web/Core/Routable/Views/Web.config | 3 +++
src/Orchard.Web/Core/Settings/Styles/Web.config | 3 +++
src/Orchard.Web/Core/Settings/Views/Web.config | 3 +++
src/Orchard.Web/Core/Shapes/Scripts/Web.config | 3 +++
src/Orchard.Web/Core/Shapes/Styles/Web.config | 3 +++
src/Orchard.Web/Core/Shapes/Views/Web.config | 3 +++
src/Orchard.Web/Media/web.config | 3 +++
.../Modules/Orchard.ArchiveLater/Content/Web.config | 3 +++
.../Modules/Orchard.ArchiveLater/Styles/Web.config | 3 +++
.../Modules/Orchard.ArchiveLater/Views/Web.config | 8 ++++++--
src/Orchard.Web/Modules/Orchard.Blogs/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Blogs/Scripts/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Blogs/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Blogs/Views/Web.config | 3 +++
.../CodeGenerationTemplates/ModuleWebConfig.txt | 3 +++
.../CodeGenerationTemplates/StaticFilesWebConfig.txt | 3 +++
.../CodeGenerationTemplates/ViewsWebConfig.txt | 3 +++
.../Modules/Orchard.Comments/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Comments/Views/Web.config | 3 +++
.../Modules/Orchard.ContentTypes/Styles/Web.config | 3 +++
.../Modules/Orchard.ContentTypes/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Email/Views/Web.config | 3 +++
.../Modules/Orchard.Experimental/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Indexing/Views/Web.config | 3 +++
.../Modules/Orchard.Localization/Styles/Web.config | 3 +++
.../Modules/Orchard.Localization/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Media/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Media/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Media/Views/Web.config | 3 +++
.../Modules/Orchard.Messaging/Views/Web.config | 3 +++
.../Modules/Orchard.Modules/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Modules/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Modules/styles/Web.config | 3 +++
.../Modules/Orchard.MultiTenancy/Content/Web.config | 3 +++
.../Modules/Orchard.MultiTenancy/Styles/Web.config | 3 +++
.../Modules/Orchard.MultiTenancy/Views/Web.config | 3 +++
.../Modules/Orchard.Packaging/Content/Web.config | 3 +++
.../Modules/Orchard.Packaging/Scripts/Web.config | 3 +++
.../Modules/Orchard.Packaging/Styles/Web.config | 3 +++
.../Modules/Orchard.Packaging/Views/Web.config | 3 +++
.../Modules/Orchard.PublishLater/Content/Web.config | 5 ++++-
.../Modules/Orchard.PublishLater/Styles/Web.config | 3 +++
.../Modules/Orchard.PublishLater/Views/Web.config | 5 ++++-
src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Search/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Users/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Users/Views/Web.config | 3 +++
.../Modules/Orchard.Widgets/Content/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config | 3 +++
src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config | 3 +++
src/Orchard.Web/Modules/TinyMce/Scripts/Web.config | 3 +++
src/Orchard.Web/Modules/TinyMce/Views/Web.config | 3 +++
src/Orchard.Web/Themes/SafeMode/Content/Web.config | 5 ++++-
src/Orchard.Web/Themes/SafeMode/Styles/Web.config | 3 +++
src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config | 5 ++++-
src/Orchard.Web/Themes/TheAdmin/Styles/Web.config | 5 ++++-
src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config | 3 +++
src/Orchard.Web/Themes/Web.config | 3 +++
78 files changed, 242 insertions(+), 9 deletions(-)
diff --git a/src/Orchard.Specs/Hosting/Orchard.Web/Core/Web.config b/src/Orchard.Specs/Hosting/Orchard.Web/Core/Web.config
index 10d6ff484..b2cbbbd39 100644
--- a/src/Orchard.Specs/Hosting/Orchard.Web/Core/Web.config
+++ b/src/Orchard.Specs/Hosting/Orchard.Web/Core/Web.config
@@ -1,6 +1,9 @@
+
+
+
diff --git a/src/Orchard.Specs/Hosting/Orchard.Web/Themes/Web.config b/src/Orchard.Specs/Hosting/Orchard.Web/Themes/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Specs/Hosting/Orchard.Web/Themes/Web.config
+++ b/src/Orchard.Specs/Hosting/Orchard.Web/Themes/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Specs/Hosting/Orchard.Web/Web.config b/src/Orchard.Specs/Hosting/Orchard.Web/Web.config
index 5253812f5..9fbdb6964 100644
--- a/src/Orchard.Specs/Hosting/Orchard.Web/Web.config
+++ b/src/Orchard.Specs/Hosting/Orchard.Web/Web.config
@@ -15,7 +15,9 @@
-
+
+
+
diff --git a/src/Orchard.Specs/Hosting/Simple.Web/Web.config b/src/Orchard.Specs/Hosting/Simple.Web/Web.config
index 1090760b1..34890f7f7 100644
--- a/src/Orchard.Specs/Hosting/Simple.Web/Web.config
+++ b/src/Orchard.Specs/Hosting/Simple.Web/Web.config
@@ -23,7 +23,9 @@
-
+
+
+
diff --git a/src/Orchard.Web/Core/Routable/Views/Web.config b/src/Orchard.Web/Core/Routable/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Core/Routable/Views/Web.config
+++ b/src/Orchard.Web/Core/Routable/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Core/Settings/Styles/Web.config b/src/Orchard.Web/Core/Settings/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Core/Settings/Styles/Web.config
+++ b/src/Orchard.Web/Core/Settings/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Core/Settings/Views/Web.config b/src/Orchard.Web/Core/Settings/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Core/Settings/Views/Web.config
+++ b/src/Orchard.Web/Core/Settings/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Core/Shapes/Scripts/Web.config b/src/Orchard.Web/Core/Shapes/Scripts/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Core/Shapes/Scripts/Web.config
+++ b/src/Orchard.Web/Core/Shapes/Scripts/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Core/Shapes/Styles/Web.config b/src/Orchard.Web/Core/Shapes/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Core/Shapes/Styles/Web.config
+++ b/src/Orchard.Web/Core/Shapes/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Core/Shapes/Views/Web.config b/src/Orchard.Web/Core/Shapes/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Core/Shapes/Views/Web.config
+++ b/src/Orchard.Web/Core/Shapes/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Media/web.config b/src/Orchard.Web/Media/web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Media/web.config
+++ b/src/Orchard.Web/Media/web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Content/Web.config b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/Web.config b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/Web.config
index 9a4455a74..a5d99eee8 100644
--- a/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.ArchiveLater/Views/Web.config
@@ -1,6 +1,10 @@
-
-
+
+
+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Blogs/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Scripts/Web.config b/src/Orchard.Web/Modules/Orchard.Blogs/Scripts/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Scripts/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Scripts/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Blogs/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Modules/Orchard.Blogs/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Blogs/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleWebConfig.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleWebConfig.txt
index bbcb89bc8..c9eedce9e 100644
--- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleWebConfig.txt
+++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ModuleWebConfig.txt
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/StaticFilesWebConfig.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/StaticFilesWebConfig.txt
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/StaticFilesWebConfig.txt
+++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/StaticFilesWebConfig.txt
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ViewsWebConfig.txt b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ViewsWebConfig.txt
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ViewsWebConfig.txt
+++ b/src/Orchard.Web/Modules/Orchard.CodeGeneration/CodeGenerationTemplates/ViewsWebConfig.txt
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Comments/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Comments/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Comments/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Comments/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Comments/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.ContentTypes/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Web.config b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Web.config
index 271dd8ba1..5c76d8df5 100644
--- a/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.ContentTypes/Views/Web.config
@@ -1,6 +1,9 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Email/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Email/Views/Web.config
index f7f177dd6..ce63a8a18 100644
--- a/src/Orchard.Web/Modules/Orchard.Email/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Email/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Experimental/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Experimental/Views/Web.config
index 53bb749f4..feccf69df 100644
--- a/src/Orchard.Web/Modules/Orchard.Experimental/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Experimental/Views/Web.config
@@ -1,6 +1,9 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Indexing/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Indexing/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Indexing/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Localization/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Localization/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Localization/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Localization/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Localization/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Localization/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Localization/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Media/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Media/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Media/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Media/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Media/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Media/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Media/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Media/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Media/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Media/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Media/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Media/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Messaging/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Messaging/Views/Web.config
index f7f177dd6..ce63a8a18 100644
--- a/src/Orchard.Web/Modules/Orchard.Messaging/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Messaging/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Modules/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Modules/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Modules/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Modules/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Modules/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Modules/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Modules/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Modules/styles/Web.config b/src/Orchard.Web/Modules/Orchard.Modules/styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Modules/styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Modules/styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Content/Web.config b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Web.config b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.MultiTenancy/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Packaging/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Packaging/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Scripts/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Scripts/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Packaging/Scripts/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Packaging/Scripts/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Packaging/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Packaging/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config
index 271dd8ba1..5c76d8df5 100644
--- a/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Packaging/Views/Web.config
@@ -1,6 +1,9 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config
index b4210f3e0..0dc62ece6 100644
--- a/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Content/Web.config
@@ -1,5 +1,8 @@
-
+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config b/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config
index 37513c05c..c56b45fa7 100644
--- a/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.PublishLater/Views/Web.config
@@ -1,5 +1,8 @@
-
+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Roles/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Roles/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Search/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Search/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Setup/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Tags/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Tags/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Themes/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Themes/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config
index dd900f1a0..61a4dd271 100644
--- a/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Themes/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Users/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Users/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Widgets/Content/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Widgets/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config
index 1f92a3531..7d689782e 100644
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.Widgets/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config b/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.jQuery/Scripts/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config b/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config
+++ b/src/Orchard.Web/Modules/Orchard.jQuery/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config b/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config
+++ b/src/Orchard.Web/Modules/TinyMce/Scripts/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Modules/TinyMce/Views/Web.config b/src/Orchard.Web/Modules/TinyMce/Views/Web.config
index 37513c05c..b7d215131 100644
--- a/src/Orchard.Web/Modules/TinyMce/Views/Web.config
+++ b/src/Orchard.Web/Modules/TinyMce/Views/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Themes/SafeMode/Content/Web.config b/src/Orchard.Web/Themes/SafeMode/Content/Web.config
index b4210f3e0..0dc62ece6 100644
--- a/src/Orchard.Web/Themes/SafeMode/Content/Web.config
+++ b/src/Orchard.Web/Themes/SafeMode/Content/Web.config
@@ -1,5 +1,8 @@
-
+
+
+
+
diff --git a/src/Orchard.Web/Themes/SafeMode/Styles/Web.config b/src/Orchard.Web/Themes/SafeMode/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Themes/SafeMode/Styles/Web.config
+++ b/src/Orchard.Web/Themes/SafeMode/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config b/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config
index b4210f3e0..0dc62ece6 100644
--- a/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config
+++ b/src/Orchard.Web/Themes/TheAdmin/Scripts/Web.config
@@ -1,5 +1,8 @@
-
+
+
+
+
diff --git a/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config b/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config
index b4210f3e0..0dc62ece6 100644
--- a/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config
+++ b/src/Orchard.Web/Themes/TheAdmin/Styles/Web.config
@@ -1,5 +1,8 @@
-
+
+
+
+
diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config
index b4210f3e0..df1c33504 100644
--- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config
+++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/Web.config
@@ -1,5 +1,8 @@
+
+
+
diff --git a/src/Orchard.Web/Themes/Web.config b/src/Orchard.Web/Themes/Web.config
index d0b6640a4..be244e18c 100644
--- a/src/Orchard.Web/Themes/Web.config
+++ b/src/Orchard.Web/Themes/Web.config
@@ -1,5 +1,8 @@
+
+
+
From 625ad334768082fae36e926106b3d3d981fe39fc Mon Sep 17 00:00:00 2001
From: Dave Reed
Date: Thu, 2 Dec 2010 14:05:09 -0800
Subject: [PATCH 13/20] #16903: Remove the Widget Page content type (and
WidgetBagPart)
--HG--
branch : dev
---
.../Orchard.Widgets/Drivers/WidgetBagPartDriver.cs | 13 -------------
.../Modules/Orchard.Widgets/Migrations.cs | 9 ---------
.../Modules/Orchard.Widgets/Models/WidgetBagPart.cs | 5 -----
.../Modules/Orchard.Widgets/Orchard.Widgets.csproj | 2 --
4 files changed, 29 deletions(-)
delete mode 100644 src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs
delete mode 100644 src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs
deleted file mode 100644
index d4072c7a8..000000000
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Drivers/WidgetBagPartDriver.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using JetBrains.Annotations;
-using Orchard.ContentManagement.Drivers;
-using Orchard.Widgets.Models;
-
-namespace Orchard.Widgets.Drivers {
- [UsedImplicitly]
- public class WidgetBagPartDriver : ContentPartDriver {
- protected override DriverResult Editor(WidgetBagPart part, dynamic shapeHelper) {
- return ContentShape("Parts_Widgets_WidegetBagPart",
- () => shapeHelper.EditorTemplate(TemplateName: "Parts/Widgets.WidgetBagPart", Model: part, Prefix: Prefix));
- }
- }
-}
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs
index f14da7222..cf2ad4b81 100644
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs
+++ b/src/Orchard.Web/Modules/Orchard.Widgets/Migrations.cs
@@ -60,15 +60,6 @@ namespace Orchard.Widgets {
.WithSetting("Stereotype", "Widget")
);
- ContentDefinitionManager.AlterTypeDefinition("WidgetPage",
- cfg => cfg
- .WithPart("CommonPart")
- .WithPart("RoutePart")
- .WithPart("WidgetBagPart")
- .WithPart("MenuPart")
- .Creatable()
- );
-
return 1;
}
}
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs b/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs
deleted file mode 100644
index 4561d6014..000000000
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Models/WidgetBagPart.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using Orchard.ContentManagement;
-
-namespace Orchard.Widgets.Models {
- public class WidgetBagPart : ContentPart {}
-}
diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj
index cbc367726..4e9284f5c 100644
--- a/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj
+++ b/src/Orchard.Web/Modules/Orchard.Widgets/Orchard.Widgets.csproj
@@ -47,14 +47,12 @@
-
-
From a6d1786e00e29e7329eb8b895920756318de2e6f Mon Sep 17 00:00:00 2001
From: Dave Reed
Date: Thu, 2 Dec 2010 15:17:46 -0800
Subject: [PATCH 14/20] #16899: Added a simple js 'loading' indicator to setup.
--HG--
branch : dev
---
.../Orchard.Setup/Content/synchronizing.gif | Bin 0 -> 1178 bytes
.../Orchard.Setup/Orchard.Setup.csproj | 16 ++++++++--
.../Modules/Orchard.Setup/Scripts/setup.js | 15 +++++++++-
.../Orchard.Setup/Views/Setup/Index.cshtml | 16 +++++++++-
.../Themes/SafeMode/Styles/site.css | 28 ++++++++++++++++++
5 files changed, 70 insertions(+), 5 deletions(-)
create mode 100644 src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif
diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif b/src/Orchard.Web/Modules/Orchard.Setup/Content/synchronizing.gif
new file mode 100644
index 0000000000000000000000000000000000000000..9fb3552b7c1e238a303f64034b738a70e598edee
GIT binary patch
literal 1178
zcmZ?wbhEHb3}Ikn*v!DtH>v*Mk)8KGEm?ayEVEgwdWO;Zvr+SRhaS9Le(XX0j*BIG
zuT@Xp=-jo;zGc33{~8Cy|J;7AA;Hd$0j@@R2F#2M3=E1tSy;G$v$B^BbSg@nVDDR^*^->OX;JkytvUNv?0KdpP}AM~VLqk2I{fps<6Jui&@r@^g2;K9kj}|NOSDGN-Y&qzJpU0-c(ZcDe<1e|<7N
zJW8ro3nl*a+&7x9}wS8H?Wy{fg>xaWy36)hIK|$T0*Ue3f
zy=l^>7GAfcd|JDap1bV%Z@Cw@?RmbBYrU8VPpOl_y6+Me>^)6eE&u~L^m*v4R=<`0
z`eu7rqxat}DhFE&4CMNAcT1lm1u`ycJ(^oYGtuJK%Y99Ox6b8nhVfhXM(>r@|1Qi@
zY7ze_K*NUZ0wdPAo$=s<8Ari3YrXz`k8`bU`S%|F$y`@jTU}g%)whWTGczaba6*e)
zFZUXaCranP`X+DN6TkO{zrc}?C6@7<4%G0>V`kgT+3Uycx1wZLZQjaT+1F34t=sra
zv+=t^3syZ7C{DU0HB-iG5`Po
literal 0
HcmV?d00001
diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj
index 3c67c661a..9a3f09c68 100644
--- a/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj
+++ b/src/Orchard.Web/Modules/Orchard.Setup/Orchard.Setup.csproj
@@ -74,9 +74,9 @@
-
- Designer
-
+
+
+
@@ -100,6 +100,16 @@
+
+
+ Designer
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.Setup/Scripts/Web.config b/src/Orchard.Web/Modules/Orchard.Setup/Scripts/Web.config
new file mode 100644
index 000000000..df1c33504
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.Setup/Scripts/Web.config
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From b4fef7188c20b198416ea35528c048dd000b7965 Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Thu, 2 Dec 2010 15:53:31 -0800
Subject: [PATCH 19/20] Updating spec test cookie handling to support removing
and updating existing cookies
--HG--
branch : dev
---
.../Hosting/RequestExtensions.cs | 24 ++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/src/Orchard.Specs/Hosting/RequestExtensions.cs b/src/Orchard.Specs/Hosting/RequestExtensions.cs
index 4a5ba60ce..1cd5d7fd9 100644
--- a/src/Orchard.Specs/Hosting/RequestExtensions.cs
+++ b/src/Orchard.Specs/Hosting/RequestExtensions.cs
@@ -4,6 +4,7 @@ using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Web;
using System.Web.Hosting;
using Orchard.Specs.Util;
@@ -45,7 +46,28 @@ namespace Orchard.Specs.Hosting {
string setCookie;
if (details.ResponseHeaders.TryGetValue("Set-Cookie", out setCookie)) {
Trace.WriteLine(string.Format("Set-Cookie: {0}", setCookie));
- webHost.Cookies = (webHost.Cookies + ';' + setCookie.Split(';').FirstOrDefault()).Trim(';');
+ var cookieName = setCookie.Split(';')[0].Split('=')[0];
+ DateTime expires;
+ if (!string.IsNullOrEmpty(webHost.Cookies)
+ && setCookie.Contains("expires=")
+ && DateTime.TryParse(setCookie.Split(new[] { "expires=" }, 2, StringSplitOptions.None)[1].Split(';')[0], out expires)
+ && expires < DateTime.Now) {
+ // remove
+ Trace.WriteLine(string.Format("Removing cookie: {0}", cookieName));
+ webHost.Cookies = Regex.Replace(webHost.Cookies, string.Format("{0}=[^;]*;?", cookieName), "");
+ }
+ else if (!string.IsNullOrEmpty(webHost.Cookies)
+ && Regex.IsMatch(webHost.Cookies, string.Format("\b{0}=", cookieName))) {
+ // replace
+ Trace.WriteLine(string.Format("Replacing cookie: {0}", cookieName));
+ webHost.Cookies = Regex.Replace(webHost.Cookies, string.Format("{0}=[^;]*(;?)", cookieName), string.Format("{0}$1", setCookie.Split(';')[0]));
+ }
+ else {
+ // add
+ Trace.WriteLine(string.Format("Adding cookie: {0}", cookieName));
+ webHost.Cookies = (webHost.Cookies + ';' + setCookie.Split(';').FirstOrDefault()).Trim(';');
+ }
+ Trace.WriteLine(string.Format("Cookie jar: {0}", webHost.Cookies));
}
return details;
From cf7115271ce79dcc6935ccf59a7a115023f01a10 Mon Sep 17 00:00:00 2001
From: Nathan Heskew
Date: Thu, 2 Dec 2010 15:55:25 -0800
Subject: [PATCH 20/20] Replacing carriage returns in comments with 's
work item: 16596
--HG--
branch : dev
---
src/Orchard.Specs/Comments.feature | 44 +++++
src/Orchard.Specs/Comments.feature.cs | 152 ++++++++++++++++++
src/Orchard.Specs/Orchard.Specs.csproj | 9 ++
.../Controllers/CommentController.cs | 2 +-
.../Views/ListOfComments.cshtml | 6 +-
5 files changed, 209 insertions(+), 4 deletions(-)
create mode 100644 src/Orchard.Specs/Comments.feature
create mode 100644 src/Orchard.Specs/Comments.feature.cs
diff --git a/src/Orchard.Specs/Comments.feature b/src/Orchard.Specs/Comments.feature
new file mode 100644
index 000000000..8ac0badd4
--- /dev/null
+++ b/src/Orchard.Specs/Comments.feature
@@ -0,0 +1,44 @@
+Feature: Comments
+ In order to enable simple comment capabilities on my site
+ As an author
+ I want to allow comments to be safely posted on specific content item pages
+
+Scenario: HTML markup in any given comment is encoded
+ Given I have installed Orchard
+ When I go to "admin/blogs/create"
+ And I fill in
+ | name | value |
+ | Routable.Title | My Blog |
+ And I hit "Save"
+ And I go to "admin/blogs"
+ And I follow "My Blog"
+ And I follow "New Post"
+ And I fill in
+ | name | value |
+ | Routable.Title | My Post |
+ | Body.Text | Hi there. |
+ And I hit "Publish Now"
+ And I go to "my-blog/my-post"
+ And I fill in
+ | name | value |
+ | CommentText | This is a link. |
+ And I hit "Submit Comment"
+ And I am redirected
+ # because the ToUrlString extension method breaks in this specific (test) environment, the returnUrl is broken...
+ And I go to "my-blog/my-post"
+ Then I should see "This is<br id="bad-br" />a <a href"
+ And I should not see " "
+ # another workaround because of ToUrlString in this environment
+ When I go to "Users/Account/LogOff"
+ And I am redirected
+ And I go to "my-blog/my-post"
+ And I fill in
+ | name | value |
+ | Name | Some One |
+ | CommentText | This is a link. |
+ And I hit "Submit Comment"
+ And I am redirected
+ # because the ToUrlString extension method breaks in this specific (test) environment, the returnUrl is broken...
+ And I go to "my-blog/my-post"
+ Then I should see "This is<br id="bad-anon-br" />a <a href"
+ And I should not see " "
\ No newline at end of file
diff --git a/src/Orchard.Specs/Comments.feature.cs b/src/Orchard.Specs/Comments.feature.cs
new file mode 100644
index 000000000..d7110fc1b
--- /dev/null
+++ b/src/Orchard.Specs/Comments.feature.cs
@@ -0,0 +1,152 @@
+// ------------------------------------------------------------------------------
+//
+// This code was generated by SpecFlow (http://www.specflow.org/).
+// SpecFlow Version:1.4.0.0
+// Runtime Version:4.0.30319.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+#region Designer generated code
+namespace Orchard.Specs
+{
+ using TechTalk.SpecFlow;
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.4.0.0")]
+ [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [NUnit.Framework.TestFixtureAttribute()]
+ [NUnit.Framework.DescriptionAttribute("Comments")]
+ public partial class CommentsFeature
+ {
+
+ private static TechTalk.SpecFlow.ITestRunner testRunner;
+
+#line 1 "Comments.feature"
+#line hidden
+
+ [NUnit.Framework.TestFixtureSetUpAttribute()]
+ public virtual void FeatureSetup()
+ {
+ testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
+ TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Comments", "In order to enable simple comment capabilities on my site\r\nAs an author\r\nI want t" +
+ "o allow comments to be safely posted on specific content item pages", GenerationTargetLanguage.CSharp, ((string[])(null)));
+ testRunner.OnFeatureStart(featureInfo);
+ }
+
+ [NUnit.Framework.TestFixtureTearDownAttribute()]
+ public virtual void FeatureTearDown()
+ {
+ testRunner.OnFeatureEnd();
+ testRunner = null;
+ }
+
+ public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
+ {
+ testRunner.OnScenarioStart(scenarioInfo);
+ }
+
+ [NUnit.Framework.TearDownAttribute()]
+ public virtual void ScenarioTearDown()
+ {
+ testRunner.OnScenarioEnd();
+ }
+
+ [NUnit.Framework.TestAttribute()]
+ [NUnit.Framework.DescriptionAttribute("HTML markup in any given comment is encoded")]
+ public virtual void HTMLMarkupInAnyGivenCommentIsEncoded()
+ {
+ TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("HTML markup in any given comment is encoded", ((string[])(null)));
+#line 6
+this.ScenarioSetup(scenarioInfo);
+#line 7
+ testRunner.Given("I have installed Orchard");
+#line 8
+ testRunner.When("I go to \"admin/blogs/create\"");
+#line hidden
+ TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table1.AddRow(new string[] {
+ "Routable.Title",
+ "My Blog"});
+#line 9
+ testRunner.And("I fill in", ((string)(null)), table1);
+#line 12
+ testRunner.And("I hit \"Save\"");
+#line 13
+ testRunner.And("I go to \"admin/blogs\"");
+#line 14
+ testRunner.And("I follow \"My Blog\"");
+#line 15
+ testRunner.And("I follow \"New Post\"");
+#line hidden
+ TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table2.AddRow(new string[] {
+ "Routable.Title",
+ "My Post"});
+ table2.AddRow(new string[] {
+ "Body.Text",
+ "Hi there."});
+#line 16
+ testRunner.And("I fill in", ((string)(null)), table2);
+#line 20
+ testRunner.And("I hit \"Publish Now\"");
+#line 21
+ testRunner.And("I go to \"my-blog/my-post\"");
+#line hidden
+ TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table3.AddRow(new string[] {
+ "CommentText",
+ "This is a link."});
+#line 22
+ testRunner.And("I fill in", ((string)(null)), table3);
+#line 25
+ testRunner.And("I hit \"Submit Comment\"");
+#line 26
+ testRunner.And("I am redirected");
+#line 28
+ testRunner.And("I go to \"my-blog/my-post\"");
+#line 29
+ testRunner.Then("I should see \"This is<br id="bad-br" />a <a href\"");
+#line 30
+ testRunner.And("I should not see \" \"");
+#line 32
+ testRunner.When("I go to \"Users/Account/LogOff\"");
+#line 33
+ testRunner.And("I am redirected");
+#line 34
+ testRunner.And("I go to \"my-blog/my-post\"");
+#line hidden
+ TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
+ "name",
+ "value"});
+ table4.AddRow(new string[] {
+ "Name",
+ "Some One"});
+ table4.AddRow(new string[] {
+ "CommentText",
+ "This is a link."});
+#line 35
+ testRunner.And("I fill in", ((string)(null)), table4);
+#line 39
+ testRunner.And("I hit \"Submit Comment\"");
+#line 40
+ testRunner.And("I am redirected");
+#line 42
+ testRunner.And("I go to \"my-blog/my-post\"");
+#line 43
+ testRunner.Then("I should see \"This is<br id="bad-anon-br" />a <a href\"");
+#line 44
+ testRunner.And("I should not see \" \"");
+#line hidden
+ testRunner.CollectScenarioErrors();
+ }
+ }
+}
+#endregion
diff --git a/src/Orchard.Specs/Orchard.Specs.csproj b/src/Orchard.Specs/Orchard.Specs.csproj
index 9b863ec27..d073c9aa0 100644
--- a/src/Orchard.Specs/Orchard.Specs.csproj
+++ b/src/Orchard.Specs/Orchard.Specs.csproj
@@ -137,6 +137,11 @@
TrueBlogs.feature
+
+ True
+ True
+ Comments.feature
+ TrueTrue
@@ -234,6 +239,10 @@
SpecFlowSingleFileGeneratorBlogs.feature.cs
+
+ SpecFlowSingleFileGenerator
+ Comments.feature.cs
+ SpecFlowSingleFileGeneratorContentRights.feature.cs
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs
index bf4e5e3ac..2863c74d8 100644
--- a/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs
+++ b/src/Orchard.Web/Modules/Orchard.Comments/Controllers/CommentController.cs
@@ -23,7 +23,7 @@ namespace Orchard.Comments.Controllers {
public Localizer T { get; set; }
- [HttpPost]
+ [HttpPost, ValidateInput(false)]
public ActionResult Create(string returnUrl) {
if (!Services.Authorizer.Authorize(Permissions.AddComment, T("Couldn't add comment")))
return !String.IsNullOrEmpty(returnUrl)
diff --git a/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.cshtml b/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.cshtml
index 24d5558df..abf748df1 100644
--- a/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.cshtml
+++ b/src/Orchard.Web/Modules/Orchard.Comments/Views/ListOfComments.cshtml
@@ -1,6 +1,6 @@
@model IEnumerable
@using Orchard.Comments.Models;
-
+@using Orchard.Utility.Extensions;
@comment.Record.CommentText
+@(new MvcHtmlString(Html.Encode(comment.Record.CommentText).ReplaceNewLinesWith("
$1")))