From b10ba55aca84b4513bc641f8bc7f298cc0f02a9c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Feb 2018 17:38:23 +0100 Subject: Open mentions in new tab --- .../app/videos/+video-watch/comment/video-comment-add.component.ts | 6 +----- .../src/app/videos/+video-watch/comment/video-comment.component.ts | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'client/src/app/videos/+video-watch/comment') diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index e3f164b94..2ddc7787c 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts @@ -60,11 +60,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { if (this.parentComment) { const mentions = this.parentComments .filter(c => c.account.id !== this.user.account.id) // Don't add mention of ourselves - .map(c => { - if (c.account.host) return '@' + c.account.name + '@' + c.account.host - - return c.account.name - }) + .map(c => c.by) const mentionsSet = new Set(mentions) const mentionsText = Array.from(mentionsSet).join(' ') + ' ' 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 8f2d79ec1..e7ba64b4d 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 @@ -100,7 +100,7 @@ export class VideoCommentComponent implements OnInit, OnChanges { allowedTags: [ 'a', 'p', 'span', 'br' ], allowedSchemes: [ 'http', 'https' ], allowedAttributes: { - 'a': [ 'href', 'class' ] + 'a': [ 'href', 'class', 'target' ] }, transformTags: { a: (tagName, attribs) => { -- cgit v1.2.3