diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-19 18:30:28 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-19 18:30:28 +0100 |
commit | 632c5e3629c2432371bb6339ad883208bff64ac2 (patch) | |
tree | 4f82091729030ded18b888d5ed3524f49d701b11 /client/src/app/videos/+video-watch/comment | |
parent | 9af61e84309c23ffbfd7562435a5fadd86cdf20c (diff) | |
download | PeerTube-632c5e3629c2432371bb6339ad883208bff64ac2.tar.gz PeerTube-632c5e3629c2432371bb6339ad883208bff64ac2.tar.zst PeerTube-632c5e3629c2432371bb6339ad883208bff64ac2.zip |
More secure target blank links
Diffstat (limited to 'client/src/app/videos/+video-watch/comment')
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comment.component.html | 2 | ||||
-rw-r--r-- | client/src/app/videos/+video-watch/comment/video-comment.component.ts | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.html b/client/src/app/videos/+video-watch/comment/video-comment.component.html index 831ea0521..8a649e88f 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.html +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.html | |||
@@ -5,7 +5,7 @@ | |||
5 | <div *ngIf="highlightedComment === true" class="highlighted-comment">Highlighted comment</div> | 5 | <div *ngIf="highlightedComment === true" class="highlighted-comment">Highlighted comment</div> |
6 | 6 | ||
7 | <div class="comment-account-date"> | 7 | <div class="comment-account-date"> |
8 | <a target="_blank" [href]="comment.account.url" class="comment-account">{{ comment.by }}</a> | 8 | <a [href]="comment.account.url" target="_blank" rel="noopener noreferrer" class="comment-account">{{ comment.by }}</a> |
9 | <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a> | 9 | <a [routerLink]="['/videos/watch', video.uuid, { 'threadId': comment.threadId }]" class="comment-date">{{ comment.createdAt | myFromNow }}</a> |
10 | </div> | 10 | </div> |
11 | <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div> | 11 | <div class="comment-html" [innerHTML]="sanitizedCommentHTML"></div> |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.ts b/client/src/app/videos/+video-watch/comment/video-comment.component.ts index cfcefed83..26fc9d0b8 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.ts | |||
@@ -107,7 +107,8 @@ export class VideoCommentComponent implements OnInit, OnChanges { | |||
107 | return { | 107 | return { |
108 | tagName, | 108 | tagName, |
109 | attribs: Object.assign(attribs, { | 109 | attribs: Object.assign(attribs, { |
110 | target: '_blank' | 110 | target: '_blank', |
111 | rel: 'noopener noreferrer' | ||
111 | }) | 112 | }) |
112 | } | 113 | } |
113 | } | 114 | } |