Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@using Orchard.Utility.Extensions;
@{
ContentItem contentItem = Model.ContentItem;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
<div class="properties">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
ContentPart contentPart = Model.ContentPart;
}
@if (Authorizer.Authorize(Permissions.CreateContent, contentPart)) {
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.ToUrlString(), Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.RawUrl, Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
@T(" | ")
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

if (contentPart.HasDraft()) {
if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
@T(" | ")
}

Expand All @@ -23,7 +23,7 @@
}

if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
@T(" | ")
}
} else {
Expand All @@ -35,7 +35,7 @@
}

if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
@T(" | ")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
}

@if (Model.ContentPart.Status == SpamStatus.Spam) {
@Html.Link(@T("Not Spam").Text, Url.Action("ReportHam", "Admin", new {area = "Orchard.AntiSpam", part.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(@T("Not Spam").Text, Url.Action("ReportHam", "Admin", new {area = "Orchard.AntiSpam", part.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
}
else {
@Html.Link(@T("Spam").Text, Url.Action("ReportSpam", "Admin", new {area = "Orchard.AntiSpam", part.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(@T("Spam").Text, Url.Action("ReportSpam", "Admin", new {area = "Orchard.AntiSpam", part.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
}

@T(" | ")
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.None, T("Choose action...").ToString())
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
</select>
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.RawUrl)
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
</fieldset>
<fieldset class="contentItems bulk-items">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@{
Script.Require("ShapesBase");
ContentItem contentItem = Model.ContentItem;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
<div class="properties">
Expand All @@ -26,7 +26,7 @@

if (contentItem.HasDraft()) {
if (Authorizer.Authorize(Orchard.Blogs.Permissions.PublishBlogPost, contentItem)) {
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.RawUrl }), new { itemprop = "UnsafeUrl" })
@T(" | ")
}

Expand All @@ -37,7 +37,7 @@
}

if (Authorizer.Authorize(Orchard.Blogs.Permissions.PublishBlogPost, contentItem)) {
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.RawUrl}), new { itemprop = "UnsafeUrl" })
@T(" | ")
}
} else {
Expand All @@ -49,7 +49,7 @@
}

if (Authorizer.Authorize(Orchard.Blogs.Permissions.PublishBlogPost, contentItem)) {
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = contentItem.Id, returnUrl = Request.RawUrl }), new { itemprop = "UnsafeUrl" })
@T(" | ")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Unpublish, T("Unpublish").ToString())
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
</select>
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.RawUrl)
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
</fieldset>
<fieldset class="contentItems bulk-items">
Expand Down
2 changes: 1 addition & 1 deletion src/Orchard.Web/Modules/Orchard.Comments/Shapes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void CommentSummaryLinks(dynamic Display, TextWriter Output, HtmlHelper H
Area = "Orchard.Comments",
Controller = "Admin",
id = item.Id,
returnUrl = Html.ViewContext.HttpContext.Request.ToUrlString()
returnUrl = Html.ViewContext.HttpContext.Request.RawUrl
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@
<td>
<div class="actions">
@if (commentEntry.Comment.Status != CommentStatus.Approved) {
<a href="@Url.Action("Approve", new {commentEntry.Comment.Id, returnUrl = Request.ToUrlString()})" itemprop="ApproveUrl UnsafeUrl">@T("Approve")</a>@T(" | ")
<a href="@Url.Action("Approve", new {commentEntry.Comment.Id, returnUrl = Request.RawUrl})" itemprop="ApproveUrl UnsafeUrl">@T("Approve")</a>@T(" | ")
}
else {
<a href="@Url.Action("Unapprove", new {commentEntry.Comment.Id, returnUrl = Request.ToUrlString()})" itemprop="UnapproveUrl UnsafeUrl">@T("Unapprove")</a>@T(" | ")
<a href="@Url.Action("Unapprove", new {commentEntry.Comment.Id, returnUrl = Request.RawUrl})" itemprop="UnapproveUrl UnsafeUrl">@T("Unapprove")</a>@T(" | ")
}
<a href="@Url.Action("Edit", new {commentEntry.Comment.Id})" title="@T("Edit")">@T("Edit")</a>@T(" | ")
<a href="@Url.Action("Delete", new {commentEntry.Comment.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
<a href="@Url.Action("Delete", new {commentEntry.Comment.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
</div>
</td> </tr>
commentIndex = commentIndex + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
@if(settings.ModerateComments) {

if (comment.Status != CommentStatus.Pending) {
@Html.Link(@T("Approve").Text, Url.Action("Approve", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(@T("Approve").Text, Url.Action("Approve", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
}
else {
@Html.Link(@T("Unapprove").Text, Url.Action("Unapprove", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
@Html.Link(@T("Unapprove").Text, Url.Action("Unapprove", "Admin", new {area = "Orchard.Comments", comment.Id, returnUrl = Request.RawUrl }), new {itemprop = "UnsafeUrl"})
}
@T(" | ")
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ else if (WorkContext.CurrentUser != null && !isAuthorized) {
else if (isAuthorized) {
@Html.ValidationSummary()
<span id="comment-form-beacon"></span>
using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Comment", new { Area = "Orchard.Comments", ReturnUrl = Context.Request.ToUrlString() }), FormMethod.Post, new { @class = "comment-form" })) {
using (Html.BeginFormAntiForgeryPost(Url.Action("Create", "Comment", new { Area = "Orchard.Comments", ReturnUrl = Context.Request.RawUrl }), FormMethod.Post, new { @class = "comment-form" })) {
if (TempData.ContainsKey("Comments.InvalidCommentEditorShape")) {
@Display(TempData["Comments.InvalidCommentEditorShape"]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Style.Require("ContentTypesAdmin");
Script.Require("jQuery");
Layout.Title = T("Edit Content Type - {0}", Html.Raw(Model.DisplayName)).Text;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}

<div class="manage">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@using Orchard.Utility.Extensions
@model Orchard.ContentTypes.ViewModels.EditPartFieldViewModel
@{
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}
<fieldset class="manage-field">
<h3>@Model.DisplayName <span>(@Model.FieldDefinition.Name.CamelFriendly())</span></h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Unpublish, T("Unpublish").ToString())
@Html.SelectOption(ContentsBulkAction.None, ContentsBulkAction.Remove, T("Delete").ToString())
</select>
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())
@Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.RawUrl)
<button type="submit" name="submit.BulkEdit" value="yes">@T("Apply")</button>
</fieldset>
<fieldset class="contentItems bulk-items">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@using Orchard.Utility.Extensions;
@{
ContentItem contentItem = Model.ContentItem;
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}
<div class="summary-condensed" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
<div class="properties">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
string name = field.Name;
var mediaParts = field.MediaParts;

var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
}
<span class="name">@displayName:</span>
<p class="media-library-picker-field media-library-picker-field-@name.HtmlClassify()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
T("Uninstall").Text,
"UninstallModule",
"PackagingServices",
new { ModuleId = module.Descriptor.Id, ReturnUrl = Request.ToUrlString(), Area = "Orchard.Packaging" },
new { ModuleId = module.Descriptor.Id, ReturnUrl = Request.RawUrl, Area = "Orchard.Packaging" },
new { itemprop = "RemoveUrl UnsafeUrl" })

@if (!String.IsNullOrEmpty(module.Descriptor.Description)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

<fieldset class="update-actions">
<a class="button" href="@Url.Action("ReloadUpdates", new { returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" title="@T("Most recent check for updates: {0}", Model.LastUpdateCheckUtc == null ? T("Unknown") : Display.DateTimeRelative(DateTimeUtc: Model.LastUpdateCheckUtc.Value))">@T("Check for Updates")</a>
<a class="button" href="@Url.Action("ReloadUpdates", new { returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl})" title="@T("Most recent check for updates: {0}", Model.LastUpdateCheckUtc == null ? T("Unknown") : Display.DateTimeRelative(DateTimeUtc: Model.LastUpdateCheckUtc.Value))">@T("Check for Updates")</a>
</fieldset>

@if (Model.Entries.Count() <= 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

<fieldset class="update-actions">
<a class="button" href="@Url.Action("ReloadUpdates", new { returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" title="@T("Most recent check for updates: {0}", Model.LastUpdateCheckUtc == null ? T("Unknown") : Display.DateTimeRelative(DateTimeUtc: Model.LastUpdateCheckUtc.Value))" >@T("Check for Updates")</a>
<a class="button" href="@Url.Action("ReloadUpdates", new { returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl})" title="@T("Most recent check for updates: {0}", Model.LastUpdateCheckUtc == null ? T("Unknown") : Display.DateTimeRelative(DateTimeUtc: Model.LastUpdateCheckUtc.Value))" >@T("Check for Updates")</a>
</fieldset>

@if (Model.Entries.Count() <= 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
@Html.ActionLink(T("Edit").ToString(), "Edit", new { row.Id })
@if (row.Name != "Administrator") {
@T(" | ")
<a href="@Url.Action("Delete", new {row.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
<a href="@Url.Action("Delete", new {row.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
}
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</td>
<td>
@Html.ActionLink(T("Edit").ToString(), "Edit", new {id = tagEntry.Tag.Id}) @T(" | ")
<a href="@Url.Action("Remove", new {tagEntry.Tag.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString()})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
<a href="@Url.Action("Remove", new {tagEntry.Tag.Id, returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl})" itemprop="RemoveUrl UnsafeUrl">@T("Delete")</a>
</td>
</tr>
tagIndex = tagIndex + 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
T("Uninstall").Text,
"UninstallTheme",
"PackagingServices",
new { ThemeId = theme.Descriptor.Id, ReturnUrl = Request.ToUrlString(), Area = "Orchard.Packaging" },
new { ThemeId = theme.Descriptor.Id, ReturnUrl = Request.RawUrl, Area = "Orchard.Packaging" },
new { itemprop = "RemoveUrl UnsafeUrl" })
}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
@if (widget.HasPublished()) {
if (widget.HasDraft()) {
if (Authorizer.Authorize(Permissions.PublishContent, widget)) {
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.RawUrl }), new { itemprop = "UnsafeUrl" })
@T(" | ")
}
}

if (Authorizer.Authorize(Permissions.PublishContent, widget)) {
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.RawUrl }), new { itemprop = "UnsafeUrl" })
@T(" | ")
}
}
else {
if (Authorizer.Authorize(Permissions.PublishContent, widget)) {
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.ToUrlString() }), new { itemprop = "UnsafeUrl" })
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new { area = "Contents", id = widget.ContentItem.Id, returnUrl = Request.RawUrl }), new { itemprop = "UnsafeUrl" })
@T(" | ")
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Orchard/Environment/DefaultHostEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override void RestartAppDomain() {
if (!httpContext.IsBackgroundContext()) {
// Don't redirect posts...
if (httpContext.Request.RequestType == "GET") {
httpContext.Response.Redirect(HttpContext.Current.Request.ToUrlString(), true /*endResponse*/);
httpContext.Response.Redirect(HttpContext.Current.Request.RawUrl, true /*endResponse*/);
}
else {
httpContext.Response.ContentType = "text/html";
Expand Down