Open mentions in new tab
authorChocobozzz <me@florianbigard.com>
Wed, 21 Feb 2018 16:38:23 +0000 (17:38 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 21 Feb 2018 16:50:41 +0000 (17:50 +0100)
client/src/app/videos/+video-watch/comment/video-comment-add.component.ts
client/src/app/videos/+video-watch/comment/video-comment.component.ts

index e3f164b94536e687f722cb48e19a8043f89ad100..2ddc7787c625db7664eb2f94828bd60fe6b1e24e 100644 (file)
@@ -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(' ') + ' '
index 8f2d79ec1c405010ae3c64468328f5729360d3ea..e7ba64b4d64813309975328b9c2d86a75cb7b78f 100644 (file)
@@ -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) => {