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