better gluon/contrib/autolinks.py, no more <embed><iframe>

This commit is contained in:
Massimo Di Pierro
2012-05-03 19:00:59 -05:00
parent a609d93836
commit 838917c148
2 changed files with 5 additions and 2 deletions

View File

@@ -1 +1 @@
Version 1.99.7 (2012-05-03 18:48:09) dev
Version 1.99.7 (2012-05-03 19:00:32) dev

View File

@@ -145,7 +145,10 @@ def expand_one(url,cdict):
r = oembed(url)
# if oembed service
if 'html' in r:
return '<embed style="max-width:100%%">%s</embed>' % r['html']
if r['html'].startswith('<object'):
return '<embed style="max-width:100%%">%s</embed>' % r['html']
else:
return r['html']
elif 'url' in r:
url = r['url']
# embed images, video, audio files