From 4db307d6fe2e5d4a955a508782662fceeed13acf Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 22 Dec 2021 20:47:50 +0800 Subject: [PATCH] fix: url in preview --- theme/purecool.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/theme/purecool.html b/theme/purecool.html index 3582fa3..419829f 100644 --- a/theme/purecool.html +++ b/theme/purecool.html @@ -179,7 +179,7 @@
-   +  
@@ -509,7 +509,10 @@ var $url = document.getElementById('url'); if ($url) { - $url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML; + //$url.innerHTML = location.protocol + '//' + location.host + $url.innerHTML; + let url = location.href; + url = url.substr(0, url.length-8); + $url.innerHTML = url.replace(/&/g, '&amp;'); $url.style.height = $url.scrollHeight + 'px'; }