From b4e15cb27f5509ffd61248fdc884f823bc0cf5d4 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 26 Mar 2021 08:37:15 +0100 Subject: [PATCH] Fix Pay-Button url preview (#2397) * Fix #2396 Adresses #2396 by creating a new element and setting the url as text rather as html. * Fix closing tag --- BTCPayServer/wwwroot/paybutton/paybutton.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/paybutton/paybutton.js b/BTCPayServer/wwwroot/paybutton/paybutton.js index a6d1e254f..9222215a8 100644 --- a/BTCPayServer/wwwroot/paybutton/paybutton.js +++ b/BTCPayServer/wwwroot/paybutton/paybutton.js @@ -197,7 +197,8 @@ function inputChanges(event, buttonSize) { } }); url = url.href; - $("#preview-link").html(`${url}`) + + $("#preview-link").empty().append($('').text(url).attr('href', url)); $('pre code').each(function (i, block) { hljs.highlightBlock(block);