HTTPS for YouTube
parent
61261d50d2
commit
0a1c8a0b90
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue