From bb13a98c1318b50375f5887e7edab9a9e11da287 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 25 Sep 2015 18:18:21 +0800 Subject: [PATCH] Updated postProcess, link should open in new window or tab --- public/js/extra.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/js/extra.js b/public/js/extra.js index 2930ec2..3ad78c9 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -207,6 +207,10 @@ function postProcess(code) { result.find("iframe").replaceWith(function () { return "" + $(this).html() + "" }); + //link should open in new window or tab + result.find('a:not([target])').attr('target', '_blank'); + return result; +} } } }