We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63eecac commit 1df8c2dCopy full SHA for 1df8c2d
static/search.js
@@ -521,10 +521,9 @@ var Search = Control.extend({
521
var $html = $('<div>').html(html);
522
$html.find('a').each(function(){
523
var $a = $(this);
524
- var a = $a[0];
525
- var isLocal = a.hostname === location.hostname;
526
- var isRelative = a.getAttribute('href').indexOf(location.hostname) === -1;
527
- if(a.hostname !== location.hostname || a.protocol !== location.protocol){
+ var isLocal = this.hostname === location.hostname;
+ var isRelative = this.getAttribute('href').indexOf(location.hostname) === -1;
+ if(this.hostname !== location.hostname || this.protocol !== location.protocol){
528
$a.attr('target', '_blank');
529
}
530
if(isLocal && isRelative){
0 commit comments