diff options
author | Cyrille Bollu <cyrpub@bollu.be> | 2019-10-11 16:12:38 +0200 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2019-10-14 10:47:07 -0100 |
commit | 7e1b613d6ff1127658e0d10227845b7515c96561 (patch) | |
tree | fb47d01df09802f661bbda067e0aa88c1aaf604b | |
parent | 4e50a4e4883b33e40418b6328ca63a2a66afe604 (diff) |
IMPROVEMENT: URLs now need to have a leading protocol to create a link.
(https://www.nextcloud.com will create a link while www.nextcloud.com won't)
Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
-rw-r--r-- | src/components/TimelinePost.vue | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/TimelinePost.vue b/src/components/TimelinePost.vue index 88a16f44..5fbdc74a 100644 --- a/src/components/TimelinePost.vue +++ b/src/components/TimelinePost.vue @@ -110,6 +110,11 @@ export default { return '' } message = message.linkify({ + validate: { + url: function(value) { + return /^(http|ftp)s?:\/\//.test(value) + } + }, formatHref: { mention: function(href) { return OC.generateUrl('/apps/social/@' + href.substring(1)) |