plugins: use to explicitely trust html
This commit is contained in:
parent
d3f844acb4
commit
1f7cb5c3ba
2 changed files with 5 additions and 3 deletions
|
@ -123,8 +123,9 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
|
||||||
|
|
||||||
<div ng-repeat="metadata in bufferline.metadata">
|
<div ng-repeat="metadata in bufferline.metadata">
|
||||||
<div ng-show="metadata.visible">
|
<div ng-show="metadata.visible">
|
||||||
<a ng-click="metadata.visible = false">Hide additional content</a>
|
|
||||||
<div ng-bind-html="metadata.content"></div>
|
<div ng-bind-html="metadata.content"></div>
|
||||||
|
<a ng-click="metadata.visible = false">Hide additional content</a>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div ng-hide="metadata.visible">
|
<div ng-hide="metadata.visible">
|
||||||
|
|
|
@ -26,7 +26,7 @@ var Plugin = function(contentForMessage) {
|
||||||
* to display when messages are received.
|
* to display when messages are received.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
plugins.service('plugins', ['userPlugins', function(userPlugins) {
|
plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defines the plugin manager object
|
* Defines the plugin manager object
|
||||||
|
@ -57,7 +57,8 @@ plugins.service('plugins', ['userPlugins', function(userPlugins) {
|
||||||
var pluginContent = plugins[i].contentForMessage(message);
|
var pluginContent = plugins[i].contentForMessage(message);
|
||||||
if (pluginContent) {
|
if (pluginContent) {
|
||||||
var pluginContent = {'visible': true,
|
var pluginContent = {'visible': true,
|
||||||
'content': pluginContent }
|
'content': $sce.trustAsHtml(pluginContent) }
|
||||||
|
|
||||||
content.push(pluginContent);
|
content.push(pluginContent);
|
||||||
|
|
||||||
if (plugins[i].exclusive) {
|
if (plugins[i].exclusive) {
|
||||||
|
|
Loading…
Reference in a new issue