summaryrefslogtreecommitdiffstats
path: root/js-old/filter/TrustUrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'js-old/filter/TrustUrl.js')
-rw-r--r--js-old/filter/TrustUrl.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js-old/filter/TrustUrl.js b/js-old/filter/TrustUrl.js
new file mode 100644
index 000000000..69e763eba
--- /dev/null
+++ b/js-old/filter/TrustUrl.js
@@ -0,0 +1,16 @@
+/**
+ * Nextcloud - News
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Bernhard Posselt <dev@bernhard-posselt.com>
+ * @copyright Bernhard Posselt 2014
+ */
+app.filter('trustUrl', function ($sce) {
+ 'use strict';
+
+ return function (url) {
+ return $sce.trustAsResourceUrl(url);
+ };
+}); \ No newline at end of file