URI decode bugfix
This commit is contained in:
parent
7cd2503c46
commit
e0629a750a
1 changed files with 4 additions and 2 deletions
|
@ -40,8 +40,10 @@
|
||||||
<script>
|
<script>
|
||||||
let h1 = document.querySelector('h1');
|
let h1 = document.querySelector('h1');
|
||||||
let h4 = document.querySelector('h4');
|
let h4 = document.querySelector('h4');
|
||||||
h1.textContent = (location.search.match(/[?&]title=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
let caption = (location.search.match(/[?&]title=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
||||||
h4.textContent = (location.search.match(/[?&]text=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
let content = (location.search.match(/[?&]text=(.*?)(?:[?&]|\/|$)/) || {1: ''})[1];
|
||||||
|
h1.textContent = decodeURIComponent(caption);
|
||||||
|
h4.textContent = decodeURIComponent(content);
|
||||||
if (location.search.match(/[?&]theme=dark/))
|
if (location.search.match(/[?&]theme=dark/))
|
||||||
document.body.classList.add('dark');
|
document.body.classList.add('dark');
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue