Skip to content

Commit

Permalink
Fixes #6827
Browse files Browse the repository at this point in the history
  • Loading branch information
kavishdahekar-sap committed Sep 16, 2019
1 parent 65b5962 commit 28280da
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/rendermime/src/renderers.ts
Expand Up @@ -597,10 +597,12 @@ namespace Private {
resolver && resolver.isLocal
? resolver.isLocal(path)
: URLExt.isLocal(path);
if (isLocal) {
el.target = '_self';
} else {
el.target = '_blank';
// set target attribute if not already present
if (!el.target) {
el.target = isLocal ? '_self' : '_blank';
}
// set rel as 'noopener' for non-local anchors
if (!isLocal) {
el.rel = 'noopener';
}
}
Expand Down

0 comments on commit 28280da

Please sign in to comment.