})
- crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi,selectedABTest) {
+ crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi,selectedABTest,$sce) {
$scope.abId="";
$scope.whatnext=2;
$scope.currentABTest=selectedABTest
}
mltokens = CRM.crmMailing.mailTokens;
+ $scope.deliberatelyTrustDangerousSnippeta = function() {
+ return $sce.trustAsHtml($scope.previewa);
+ };
+
+ $scope.deliberatelyTrustDangerousSnippetb = function() {
+ return $sce.trustAsHtml($scope.previewb);
+ };
$scope.tab_val = 0;
$scope.max_tab = 0;
$scope.previewa=data.values.html;
- $scope.prea='I am an <code>HTML</code>string with ' +
- '<a href="#">links!</a> and other <em>stuff</em>';
-
- //$scope.previewa1=$scope.previewa.substring(3935);
- //$scope.previewa1='<style>'+$scope.previewa.substring(0,3935)+'</style>'+$scope.previewa.substring(3935);
- $scope.previewa1= '<style type="text/css">color: blue;</style><div>gfgfdgdfgdgdf</div>'
}
console.log(data.values.html);
$scope.previewb=data.values.html;
- $scope.previewb1=$scope.previewb.substring(3935);
-
- $scope.$apply();
}
});
{{currentABTest.mailing_id_b}}<br>
{{currentABTest.mailing_id_a}}<br>
-{{previewa1}}<br>
<div ui-jq="tabs" id="alltabs">
<ul>
</li>
</ul>
- <div id="frag1" ng-bind-html="previewa1" >
+ <div id="frag1" ng-bind-html="deliberatelyTrustDangerousSnippeta()" >
</div>
- <div id="frag2" ng-bind-html="previewb1">
+ <div id="frag2" ng-bind-html="deliberatelyTrustDangerousSnippetb()">
</div>