Commit a8957703ffdfbeec50be89b480213a0c41d12389
link preview: check that channel is valid
fixes #774Matt McKegg committed on 4/20/2018, 11:50:15 AM
Parent: 6086da9c52c8b0f9c6d63f86cddae0a3db75a314
Files changed
modules/app/link-preview.js | changed |
modules/app/link-preview.js | ||
---|---|---|
@@ -53,9 +53,9 @@ | ||
53 | 53 | h('strong', [i18n('External Link'), ' ๐']), h('br'), |
54 | 54 | h('code', href) |
55 | 55 | ]) |
56 | 56 | ]) |
57 | - } else if (href.startsWith('#') && href.length > 1) { | |
57 | + } else if (href.startsWith('#') && ref.normalizeChannel(href)) { | |
58 | 58 | preview = api.channel.html.preview(href.slice(1)) |
59 | 59 | } |
60 | 60 | } |
61 | 61 |
Built with git-ssb-web