Skip to content

Commit

Permalink
fix bug regarding "extblank" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
unverbuggt committed May 28, 2023
1 parent bb7fec0 commit d426876
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions risonia_theme/plugins/classes/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def on_page_content(self, html, page, config, files):
#send external links to new tab?
if 'extblank' in config['theme']._vars and config['theme']._vars['extblank']:
for link_tag in soup.find_all('a'):
href = link_tag['href']
if href.startswith('http://') or href.startswith('https://'):
if not 'target' in link_tag:
link_tag['target'] = '_blank'
Expand Down

0 comments on commit d426876

Please sign in to comment.