Fix URL encoding showing up in title
This commit is contained in:
parent
cac047d121
commit
3b018da07e
|
@ -94,6 +94,8 @@ dependencies = [
|
|||
"humansize",
|
||||
"num-traits",
|
||||
"percent-encoding",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -8,7 +8,7 @@ repository = "https://github.com/vijfhoek/empede"
|
|||
|
||||
[dependencies]
|
||||
anyhow = "1.0.70"
|
||||
askama = { version = "0.12.0", default-features = false }
|
||||
askama = { version = "0.12.0", default-features = false, features = ["serde-json"] }
|
||||
askama_tide = "0.15.0"
|
||||
async-std = { version = "1.12.0", features = ["attributes"] }
|
||||
infer = { version = "0.13.0", default-features = false }
|
||||
|
|
|
@ -57,9 +57,9 @@
|
|||
<script>
|
||||
{% if let Some(name) = name %}
|
||||
{% if state == mpdrs::State::Play %}
|
||||
document.title = decodeURI("▶ {{ name|urlencode }} - Empede");
|
||||
document.title = "▶ " + {{ name|json|safe }} + " - Empede";
|
||||
{% else %}
|
||||
document.title = decodeURI("⏸ {{ name|urlencode }} - Empede");
|
||||
document.title = "⏸ " + {{ name|json|safe }} + " - Empede";
|
||||
{% endif %}
|
||||
{% else %}
|
||||
document.title = "Empede";
|
||||
|
|
Loading…
Reference in New Issue