Skip to content

Commit 264afab

Browse files
committed
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>
1 parent 935f844 commit 264afab

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/components/TimelinePost.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ export default {
110110
return ''
111111
}
112112
message = message.linkify({
113+
validate: {
114+
url: function(value) {
115+
return /^(http|ftp)s?:\/\//.test(value)
116+
}
117+
},
113118
formatHref: {
114119
mention: function(href) {
115120
return OC.generateUrl('/apps/social/@' + href.substring(1))

0 commit comments

Comments
 (0)