From 28eaab7f7d549516397b5d48c0184e1b5f0c0060 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 12 Nov 2013 11:35:22 +0100 Subject: [PATCH] trust enclosure urls --- src/main/webapp/js/filters.js | 8 +++++++- src/main/webapp/templates/_toolbar.html | 2 +- src/main/webapp/templates/feeds.view.html | 14 +++++++------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/main/webapp/js/filters.js b/src/main/webapp/js/filters.js index 60a75fb8..b0128593 100644 --- a/src/main/webapp/js/filters.js +++ b/src/main/webapp/js/filters.js @@ -22,12 +22,18 @@ module.filter('escape', function() { return encodeURIComponent; }); -module.filter('unsafe', ['$sce', function($sce) { +module.filter('trustHtml', ['$sce', function($sce) { return function(val) { return $sce.trustAsHtml(val); }; }]); +module.filter('trustUrl', ['$sce', function($sce) { + return function(val) { + return $sce.trustAsResourceUrl(val); + }; +}]); + module.filter('highlight', function() { return function(html, keywords) { if (keywords) { diff --git a/src/main/webapp/templates/_toolbar.html b/src/main/webapp/templates/_toolbar.html index 10867409..7f437643 100644 --- a/src/main/webapp/templates/_toolbar.html +++ b/src/main/webapp/templates/_toolbar.html @@ -82,6 +82,6 @@
- + \ No newline at end of file diff --git a/src/main/webapp/templates/feeds.view.html b/src/main/webapp/templates/feeds.view.html index 8719ed46..3d3e00d1 100644 --- a/src/main/webapp/templates/feeds.view.html +++ b/src/main/webapp/templates/feeds.view.html @@ -29,7 +29,7 @@ {{entry.feedName}} {{entry.date | entryDate}} - + @@ -39,7 +39,7 @@ ng-mouseup="bodyClicked(entry, $event)" ng-class="{rtl: entry.rtl}">
- +
${view.entry_source} @@ -56,18 +56,18 @@
-
+
- +
- ${global.download} + ${global.download}