Updated postProcess, link should open in new window or tab

This commit is contained in:
Wu Cheng-Han 2015-09-25 18:18:21 +08:00
parent 2463a5126b
commit bb13a98c13

View file

@ -207,6 +207,10 @@ function postProcess(code) {
result.find("iframe").replaceWith(function () { result.find("iframe").replaceWith(function () {
return "<noiframe>" + $(this).html() + "</noiframe>" return "<noiframe>" + $(this).html() + "</noiframe>"
}); });
//link should open in new window or tab
result.find('a:not([target])').attr('target', '_blank');
return result;
}
} }
} }
} }