Wrap oEmbed html output in a div

To keep a constant aspect ratio for the resulting iframe of an oEmbed
request in a responsive website, the iframe needs a div wrapper. With
this change, html results are wrapped in a "oembed" class div.
This commit is contained in:
Sami Turcotte 2015-04-04 03:33:33 -04:00
parent 7f12354970
commit f3f09aae98

View file

@ -21,6 +21,8 @@ class OEmbedLinkPattern(Pattern):
html = self.get_oembed_html_for_match(match)
if html is None:
return None
else:
html = "<div class=\"oembed\">%s</div>" % html
placeholder = self.markdown.htmlStash.store(html, True)
return placeholder