From 28f96f8517bf4c2ae31a7aa1d6b7c755913ec4b2 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 9 May 2019 09:18:21 +0200 Subject: [PATCH] Force http on links --- client/src/components/content-blocks/LinkBlock.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/client/src/components/content-blocks/LinkBlock.vue b/client/src/components/content-blocks/LinkBlock.vue index 01b03012..03d7a8ae 100644 --- a/client/src/components/content-blocks/LinkBlock.vue +++ b/client/src/components/content-blocks/LinkBlock.vue @@ -1,7 +1,7 @@ @@ -13,6 +13,13 @@ components: { LinkIcon + }, + + computed: { + href() { + const url = this.value.url; + return url.startsWith('http') ? this.value.url : `http://${this.value.url}`; + } } }