diff options
Diffstat (limited to 'apps/comments/js/commentstabview.js')
-rw-r--r-- | apps/comments/js/commentstabview.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/comments/js/commentstabview.js b/apps/comments/js/commentstabview.js index e8bd4f82e9b..c4b2bd61d4e 100644 --- a/apps/comments/js/commentstabview.js +++ b/apps/comments/js/commentstabview.js @@ -257,10 +257,17 @@ for(var i in mentions) { var mention = '@' + mentions[i].mentionId; + var avatar = ''; + if(this._avatarsEnabled) { + avatar = '<div class="avatar" ' + + 'data-user="' + _.escape(mentions[i].mentionId) + '"' + +' data-user-display-name="' + + _.escape(mentions[i].mentionDisplayName) + '"></div>'; + } // escape possible regex characters in the name mention = mention.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - var displayName = '<b>'+ _.escape(mentions[i].mentionDisplayName)+'</b>'; + var displayName = avatar + ' <strong>'+ _.escape(mentions[i].mentionDisplayName)+'</strong>'; // replace every mention either at the start of the input or after a whitespace // followed by a non-word character. |