HTTPS for YouTube

master
Nick Sergeant 2012-06-12 10:34:16 -04:00
parent 61261d50d2
commit 0a1c8a0b90
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Snipt(models.Model):
# YouTube embeds
for match in re.findall('\[\[youtube-(\w{11})\-(\d+)x(\d+)\]\]', self.stylized):
self.stylized = self.stylized.replace('[[youtube-{}-{}x{}]]'.format(str(match[0]), str(match[1]), str(match[2])),
'<iframe width="{}" height="{}" src="http://www.youtube.com/embed/{}" frameborder="0" allowfullscreen></iframe>'.format(match[1], match[2], match[0]))
'<iframe width="{}" height="{}" src="https://www.youtube.com/embed/{}" frameborder="0" allowfullscreen></iframe>'.format(match[1], match[2], match[0]))
else:
self.stylized = highlight(self.code,