From f51c4e332ed8aa82962d18b1966b2a10a24751d7 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 21 Aug 2013 11:14:37 +1000 Subject: [PATCH] Fixes: U4-2653 BeginUmbracoForm should use absolute path with query string URLs without the protocol --- src/Umbraco.Web/HtmlHelperRenderExtensions.cs | 2 +- src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs index ecccd126a0..79d6ec3f7c 100644 --- a/src/Umbraco.Web/HtmlHelperRenderExtensions.cs +++ b/src/Umbraco.Web/HtmlHelperRenderExtensions.cs @@ -466,7 +466,7 @@ namespace Umbraco.Web Mandate.ParameterNotNullOrEmpty(action, "action"); Mandate.ParameterNotNullOrEmpty(controllerName, "controllerName"); - var formAction = UmbracoContext.Current.OriginalRequestUrl.ToString(); + var formAction = UmbracoContext.Current.OriginalRequestUrl.PathAndQuery; return html.RenderForm(formAction, FormMethod.Post, htmlAttributes, controllerName, action, area, additionalRouteVals); } diff --git a/src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs b/src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs index 83db913b44..df5584ce11 100644 --- a/src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs +++ b/src/Umbraco.Web/Routing/PublishedContentNotFoundHandler.cs @@ -37,7 +37,7 @@ namespace Umbraco.Web.Routing response.Write("

Page not found

"); response.Write("

"); - response.Write(string.Format(reason, HttpUtility.HtmlEncode(UmbracoContext.Current.OriginalRequestUrl))); + response.Write(string.Format(reason, HttpUtility.HtmlEncode(UmbracoContext.Current.OriginalRequestUrl.PathAndQuery))); response.Write("

"); if (!string.IsNullOrWhiteSpace(_message)) response.Write("

" + _message + "

");