From aa29c6fcc6f87981e77eadd55d29d7d79fec8053 Mon Sep 17 00:00:00 2001 From: samaradel Date: Thu, 21 Jul 2022 21:55:09 +0200 Subject: [PATCH] preventDefault events --- templates/shortcodes/button.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/templates/shortcodes/button.html b/templates/shortcodes/button.html index c524eb132..420ede929 100644 --- a/templates/shortcodes/button.html +++ b/templates/shortcodes/button.html @@ -3,18 +3,27 @@ {% set path = body | split(pat="href=") | slice(start=1) | first | split(pat=">") | first | trim_start_matches(pat='"') | trim_end_matches(pat='"') %} +

{{path}}

{% if 'https' in path %} -{% elif base is containing("www_threefold_io") or path is containing("/") %} +{% elif base is containing("www_threefold_io") %} {% set btn_path = base ~ path %} - + +{% elif path is starting_with("/") %} +{% set btn_path = base ~ path %} + + {% else %}