From e4995bae974c6664a2bec09d0a376f41775cd04c Mon Sep 17 00:00:00 2001 From: Daryl Fritz Date: Tue, 14 Jun 2022 20:50:09 +0000 Subject: [PATCH] Use _blank for the target Some browsers might interpret "blank" as a named frame. You might want to consider using the browser standard _blank https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target --- _plugins/open_external_links_in_new_tab.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_plugins/open_external_links_in_new_tab.rb b/_plugins/open_external_links_in_new_tab.rb index fc00afe..6fbf10e 100644 --- a/_plugins/open_external_links_in_new_tab.rb +++ b/_plugins/open_external_links_in_new_tab.rb @@ -21,7 +21,7 @@ def convert_links(doc) if open_external_links_in_new_tab parsed_doc = Nokogiri::HTML(doc.content) parsed_doc.css("a:not(.internal-link):not(.footnote):not(.reversefootnote)").each do |link| - link.set_attribute('target', 'blank') + link.set_attribute('target', '_blank') end doc.content = parsed_doc.to_html end