From a57b201b3980bb45c62e37e6932f04f519dac498 Mon Sep 17 00:00:00 2001 From: Ivan Fonseca Date: Tue, 24 Jul 2018 15:35:19 -0400 Subject: [PATCH] Only select links starting with http(s) --- tildes/static/js/behaviors/comment-text.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tildes/static/js/behaviors/comment-text.js b/tildes/static/js/behaviors/comment-text.js index c14aa6f..572002b 100644 --- a/tildes/static/js/behaviors/comment-text.js +++ b/tildes/static/js/behaviors/comment-text.js @@ -1,4 +1,4 @@ $.onmount('[data-js-comment-text]', function() { // Make all links in comment open in new tab - $(this).find('a').attr('target', '_blank'); + $(this).find('a[href^="http"]').attr('target', '_blank'); });