fixes U4-6333, U4-6348
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
*/
|
||||
function LegacyController($scope, $routeParams, $element) {
|
||||
|
||||
var url = $routeParams.url;
|
||||
var toClean = "*?(){}[];:%<>/\\|&'\"";
|
||||
var url = decodeURIComponent($routeParams.url.toLowerCase().trimStart("javascript:"));
|
||||
var toClean = "*(){}[];:<>\\|'\"";
|
||||
for (var i = 0; i < toClean.length; i++) {
|
||||
url = url.replace(toClean[i], "");
|
||||
var reg = new RegExp("\\" + toClean[i], "g");
|
||||
url = url.replace(reg, "");
|
||||
}
|
||||
$scope.legacyPath = decodeURIComponent(url);
|
||||
$scope.legacyPath = url;
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller('Umbraco.LegacyController', LegacyController);
|
||||
@@ -1,16 +1,24 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="endPreview.aspx.cs" Inherits="umbraco.presentation.endPreview" %>
|
||||
<%@ Page Language="C#" AutoEventWireup="true" Inherits="System.Web.UI.Page" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<script runat="server">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
Redirecting...
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
global::umbraco.presentation.preview.PreviewContent.ClearPreviewCookie();
|
||||
|
||||
if (!Uri.IsWellFormedUriString(Request.QueryString["redir"], UriKind.Relative))
|
||||
{
|
||||
Response.Redirect("/", true);
|
||||
}
|
||||
Uri url;
|
||||
if (!Uri.TryCreate(Request.QueryString["redir"], UriKind.Relative, out url))
|
||||
{
|
||||
Response.Redirect("/", true);
|
||||
}
|
||||
|
||||
Response.Redirect(url.ToString(), true);
|
||||
}
|
||||
|
||||
</script>5
|
||||
@@ -934,9 +934,6 @@
|
||||
<Compile Include="umbraco.presentation\umbraco\dialogs\publish.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\endPreview.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="umbraco.presentation\umbraco\helpRedirect.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace umbraco.presentation
|
||||
{
|
||||
public partial class endPreview : BasePages.UmbracoEnsuredPage
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
preview.PreviewContent.ClearPreviewCookie();
|
||||
Response.Redirect(helper.Request("redir"), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user