better gluon/contrib/autolinks.py (still not sure this is behavior I want)
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 1.99.7 (2012-05-03 17:55:38) dev
|
||||
Version 1.99.7 (2012-05-03 18:48:09) dev
|
||||
|
||||
@@ -158,7 +158,7 @@ def expand_one(url,cdict):
|
||||
def expand_html(html,cdict=None):
|
||||
soup = BeautifulSoup(html)
|
||||
for txt in soup.findAll(text=True):
|
||||
if txt.parent.name != 'a':
|
||||
if not txt.parent.name in ('a','script','pre','code','embed','object','audio','video'):
|
||||
ntxt = regex_link.sub(
|
||||
lambda match: expand_one(match.group(0),cdict), txt)
|
||||
txt.replaceWith(BeautifulSoup(ntxt))
|
||||
|
||||
Reference in New Issue
Block a user