Fixed broken Html element view.

This commit is contained in:
Sipke Schoorstra
2015-07-04 10:32:11 +02:00
parent c75ba007e6
commit 504f484b19

View File

@@ -2,7 +2,7 @@
@using Orchard.Layouts.Helpers
@{
// Only render the surrounding div if there are any attributes to be rendered.
tagBuilder.InnerHtml = Model.ProcessedContent;
var commonAttributes = (IDictionary<string, object>)TagBuilderExtensions.GetCommonElementAttributes(Model);
var tagBuilder = commonAttributes.Any() ? new OrchardTagBuilder("div") : default(OrchardTagBuilder);
if (tagBuilder != null) {
@@ -10,5 +10,5 @@
}
}
@if (tagBuilder != null) { @tagBuilder.StartElement }
@Html.Raw(Model.ProcessedText)
@Html.Raw(Model.ProcessedContent)
@if (tagBuilder != null) { @tagBuilder.EndElement }