From 8c70f8ad9102e70e7e9c90983dca632cf980cd74 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Wed, 22 Dec 2021 20:46:47 +0800 Subject: [PATCH] fix: url in preview --- theme/onemoe.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/theme/onemoe.html b/theme/onemoe.html index 76a3308..78a6001 100644 --- a/theme/onemoe.html +++ b/theme/onemoe.html @@ -479,7 +479,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'; }