1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

fix(music): tokens with & not rendering

Fixes partially #629
This commit is contained in:
Jake Stanger 2024-06-03 21:52:08 +01:00
parent a93108b7e7
commit 176af997f4
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -5,7 +5,7 @@ use std::sync::Arc;
use std::time::Duration;
use color_eyre::Result;
use glib::{Propagation, PropertySet};
use glib::{markup_escape_text, Propagation, PropertySet};
use gtk::prelude::*;
use gtk::{Button, IconTheme, Label, Orientation, Scale};
use regex::Regex;
@ -531,6 +531,7 @@ fn get_token_value(song: &Track, token: &str) -> String {
"track" => song.track.map(|x| x.to_string()),
_ => Some(token.to_string()),
}
.map(|str| markup_escape_text(str.as_str()).to_string())
.unwrap_or_default()
}