more angular 1.3 upgrade fixes

This commit is contained in:
Torkel Ödegaard 2014-08-06 09:10:18 +02:00
parent 387ec89b95
commit d70c81f03b
3 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<div ng-controller='text' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-dblclick="openEditor()">
<p ng-bind-html-unsafe="content">
<p ng-bind-html="content">
</p>
</div>

View File

@ -23,7 +23,7 @@ function (angular, app, _, require) {
var module = angular.module('grafana.panels.text', []);
app.useModule(module);
module.controller('text', function($scope, filterSrv) {
module.controller('text', function($scope, filterSrv, $sce) {
$scope.panelMeta = {
description : "A static text panel that can use plain text, markdown, or (sanitized) HTML"
@ -81,7 +81,7 @@ function (angular, app, _, require) {
$scope.updateContent = function(html) {
try {
$scope.content = filterSrv.applyTemplateToTarget(html);
$scope.content = $sce.trustAsHtml(filterSrv.applyTemplateToTarget(html));
if(!$scope.$$phase) {
$scope.$apply();

View File

@ -58,7 +58,6 @@ module.exports = function(config,grunt) {
'angular-strap',
'directives/all',
'jquery.flot.pie',
'angular-sanitize',
'angular-dragdrop',
]
}