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

Merge pull request #631 from JakeStanger/fix/music-token-escape

fix(music): tokens with `&` not rendering
This commit is contained in:
Jake Stanger 2024-06-03 22:00:00 +01:00 committed by GitHub
commit b0132bdb2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()
}