aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-23 16:32:49 +0100
committerChocobozzz <me@florianbigard.com>2018-01-23 16:32:49 +0100
commit63c4b44961aa86ed4dabf039e495879103f9d729 (patch)
tree31a5dadf78fa6553f4e2aa0d53af68e747556c53
parente494f91e6798cd1f3c640f2f28aa2c8436501e20 (diff)
downloadPeerTube-63c4b44961aa86ed4dabf039e495879103f9d729.tar.gz
PeerTube-63c4b44961aa86ed4dabf039e495879103f9d729.tar.zst
PeerTube-63c4b44961aa86ed4dabf039e495879103f9d729.zip
Avoid to linkify truncated links
-rw-r--r--client/src/app/videos/shared/markdown.service.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/app/videos/shared/markdown.service.ts b/client/src/app/videos/shared/markdown.service.ts
index d8b5b76b6..82745f0c6 100644
--- a/client/src/app/videos/shared/markdown.service.ts
+++ b/client/src/app/videos/shared/markdown.service.ts
@@ -35,6 +35,9 @@ export class MarkdownService {
35 } 35 }
36 36
37 markdownToHTML (markdown: string) { 37 markdownToHTML (markdown: string) {
38 return this.markdownIt.render(markdown) 38 const html = this.markdownIt.render(markdown)
39
40 // Avoid linkify truncated links
41 return html.replace(/<a[^>]+>([^<]+)<\/a>\s*...(<\/p>)?$/mi, '$1...')
39 } 42 }
40} 43}