fixes U4-6333, U4-6348

This commit is contained in:
Shannon
2015-03-03 17:36:53 +11:00
parent d32cf12c6f
commit f708a24401
4 changed files with 27 additions and 48 deletions

View File

@@ -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);