mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Fixed a client side HTML decoding issue.
This commit is contained in:
@@ -270,7 +270,7 @@ angular
|
||||
$scope.$root.editElement(receivedElement).then(function (args) {
|
||||
if (!args.cancel) {
|
||||
receivedElement.data = decodeURIComponent(args.element.data);
|
||||
receivedElement.setHtml(args.element.html);
|
||||
receivedElement.setHtml(decodeURIComponent(args.element.html.replace(/\+/g, "%20")));
|
||||
}
|
||||
$timeout(function () {
|
||||
if (!!args.cancel)
|
||||
@@ -634,7 +634,6 @@ angular
|
||||
|
||||
// Overwrite the setHtml function so that we can use the $sce service to trust the html (and not have the html binding strip certain tags).
|
||||
$scope.element.setHtml = function (html) {
|
||||
html = decodeURIComponent(html.replace(/\+/g, "%20"));
|
||||
$scope.element.html = html;
|
||||
$scope.element.htmlUnsafe = $sce.trustAsHtml(html);
|
||||
};
|
||||
|
File diff suppressed because one or more lines are too long
@@ -23,7 +23,6 @@
|
||||
|
||||
// Overwrite the setHtml function so that we can use the $sce service to trust the html (and not have the html binding strip certain tags).
|
||||
$scope.element.setHtml = function (html) {
|
||||
html = decodeURIComponent(html.replace(/\+/g, "%20"));
|
||||
$scope.element.html = html;
|
||||
$scope.element.htmlUnsafe = $sce.trustAsHtml(html);
|
||||
};
|
||||
|
@@ -239,7 +239,7 @@
|
||||
$scope.$root.editElement(receivedElement).then(function (args) {
|
||||
if (!args.cancel) {
|
||||
receivedElement.data = decodeURIComponent(args.element.data);
|
||||
receivedElement.setHtml(args.element.html);
|
||||
receivedElement.setHtml(decodeURIComponent(args.element.html.replace(/\+/g, "%20")));
|
||||
}
|
||||
$timeout(function () {
|
||||
if (!!args.cancel)
|
||||
|
@@ -871,7 +871,6 @@ var LayoutEditor;
|
||||
|
||||
// This function will be overwritten by the Content directive.
|
||||
this.setHtml = function (html) {
|
||||
html = decodeURIComponent(html.replace(/\+/g, "%20"));
|
||||
this.html = html;
|
||||
this.htmlUnsafe = html;
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
@@ -16,7 +16,6 @@
|
||||
|
||||
// This function will be overwritten by the Content directive.
|
||||
this.setHtml = function (html) {
|
||||
html = decodeURIComponent(html.replace(/\+/g, "%20"));
|
||||
this.html = html;
|
||||
this.htmlUnsafe = html;
|
||||
}
|
||||
|
Reference in New Issue
Block a user