Merge pull request #802 from kurros/https-pastebin

allow browser to use https for pastebin embeds
This commit is contained in:
David Cormier 2016-08-06 00:17:27 -04:00 committed by GitHub
commit 1d1a1e2818

View file

@ -457,11 +457,11 @@ plugins.factory('userPlugins', function() {
});
var pastebinPlugin = new UrlPlugin('Pastebin', function(url) {
var regexp = /^http:\/\/pastebin.com\/([^.?]+)/i;
var regexp = /^https?:\/\/pastebin.com\/([^.?]+)/i;
var match = url.match(regexp);
if (match) {
var id = match[1],
embedurl = "http://pastebin.com/embed_iframe/" + id,
embedurl = "//pastebin.com/embed_iframe/" + id,
element = angular.element('<iframe></iframe>')
.attr('src', embedurl)
.attr('width', '100%')