From 62e7dbe920b08a5a3de20a2dacc0bb1d1b20da51 Mon Sep 17 00:00:00 2001 From: Jeremy Mahieu Date: Wed, 22 Jul 2020 21:17:43 +0200 Subject: [PATCH] Omit getting script in oembed for twitter --- js/plugins.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/js/plugins.js b/js/plugins.js index 9d76376..c36d8bf 100644 --- a/js/plugins.js +++ b/js/plugins.js @@ -515,16 +515,12 @@ plugins.factory('userPlugins', function() { var regexp = /^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(?:es)?\/(\d+)/i; var match = url.match(regexp); if (match) { - url = 'https://api.twitter.com/1/statuses/oembed.json?id=' + match[2]; + url = 'https://api.twitter.com/1/statuses/oembed.json?omit_script=true&id=' + match[2]; return function() { var element = this.getElement(); jsonp(url, function(data) { - // separate the HTML into content and script tag - var scriptIndex = data.html.indexOf("