diff options
Diffstat (limited to 'src/web/app/common/scripts')
| -rw-r--r-- | src/web/app/common/scripts/text-compiler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index 2edffbb766..d4570ca923 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -21,8 +21,10 @@ module.exports = (tokens, shouldBreak) => { .replace(/(\r\n|\n|\r)/g, shouldBreak ? '<br>' : ' '); case 'bold': return '<strong>' + escape(token.bold) + '</strong>'; - case 'link': + case 'url': return '<mk-url href="' + escape(token.content) + '" target="_blank"></mk-url>'; + case 'link': + return '<a class="link" href="' + escape(token.url) + '" target="_blank">' + escape(token.title) + '</a>'; case 'mention': return '<a href="' + CONFIG.url + '/' + escape(token.username) + '" target="_blank" data-user-preview="' + token.content + '" ' + (me && me.username == token.username ? 'data-is-me' : '') + '>' + token.content + '</a>'; case 'hashtag': // TODO |