You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/02/27 17:18:32 UTC
[15/16] git commit: [#7207] add comment,
support potential future embed source that does not have iframes
[#7207] add comment, support potential future embed source that does not have iframes
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3422d680
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3422d680
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3422d680
Branch: refs/heads/cj/7210
Commit: 3422d6803c556bf883073fd5b216dde631f68eeb
Parents: 9bdfdd1
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Feb 27 14:47:47 2014 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Feb 27 14:48:37 2014 +0000
----------------------------------------------------------------------
Allura/allura/lib/macro.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3422d680/Allura/allura/lib/macro.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/macro.py b/Allura/allura/lib/macro.py
index 2116c23..29181fb 100644
--- a/Allura/allura/lib/macro.py
+++ b/Allura/allura/lib/macro.py
@@ -401,6 +401,7 @@ def embed(url=None):
html = None
if html:
+ # convert iframe src from http to https, to avoid mixed security blocking when used on an https page
html = BeautifulSoup(html)
embed_url = html.find('iframe').get('src')
if embed_url:
@@ -410,6 +411,6 @@ def embed(url=None):
else:
embed_url = embed_url.geturl()
html.find('iframe')['src'] = embed_url
- return jinja2.Markup('<div class="grid-20">%s</div>' % html)
+ return jinja2.Markup('<div class="grid-20">%s</div>' % html)
return '[[embed url=%s]]' % url