Fixes 5591 : ContentType's name encoding

This commit is contained in:
Thierry Fleury 2015-08-10 15:28:19 +02:00
parent b206a656e8
commit cc70480126
5 changed files with 7 additions and 8 deletions

View File

@ -4,9 +4,8 @@
@{
ContentItem contentItem = Model.ContentItem;
var typeDisplayName = contentItem.TypeDefinition.DisplayName ?? contentItem.ContentType.CamelFriendly();
var pageTitle = T("New {0}", typeDisplayName);
Layout.Title = (string)pageTitle.Text;
Layout.Title = T("New {0}", Html.Raw(typeDisplayName)).Text;
}
@using (Html.BeginFormAntiForgeryPost(Url.Action("Create", new { ReturnUrl = Request.QueryString["ReturnUrl"] }), FormMethod.Post, new { enctype = "multipart/form-data" })) {

View File

@ -4,13 +4,13 @@
var pageTitle = T("Manage Content");
var createLinkText = T("Create New Content");
if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
pageTitle = T("Manage {0} Content", typeDisplayName);
createLinkText = T("Create New {0}", typeDisplayName);
pageTitle = T("Manage {0} Content", Html.Raw(typeDisplayName));
createLinkText = T("Create New {0}", Html.Raw(typeDisplayName));
}
IEnumerable<string> cultures = Model.Options.Cultures;
Layout.Title = pageTitle;
Layout.Title = pageTitle.Text;
}
<div class="manage">

View File

@ -2,7 +2,7 @@
@{
Style.Require("ContentTypesAdmin");
Script.Require("jQuery");
Layout.Title = T("Edit Content Type - {0}", Model.DisplayName).ToString();
Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text;
}
<div class="manage">

View File

@ -3,7 +3,7 @@
@{
Style.Require("ContentTypesAdmin");
Layout.Title = T("Edit Field \"{0}\"", Model.Name).ToString();
Layout.Title = T("Edit Field \"{0}\"", Html.Raw(Model.DisplayName)).ToString();
}
@using (Html.BeginFormAntiForgeryPost()) {

View File

@ -9,7 +9,7 @@
<div class="properties">
<h3>@Model.DisplayName</h3> @if (!string.IsNullOrWhiteSpace(stereotype)) { <text><span class="stereotype" title="Stereotype">- @stereotype</span></text>}
@if (creatable) {
<p class="pageStatus">@Html.ActionLink(T("Create New {0}", Model.DisplayName).Text, "Create", new {area = "Contents", id = Model.Name})</p>
<p class="pageStatus">@Html.ActionLink(T("Create New {0}", Html.Raw(Model.DisplayName)).Text, "Create", new {area = "Contents", id = Model.Name})</p>
}
</div>
<div class="related">@if (creatable) {