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:
commit
b0132bdb2b
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use glib::{Propagation, PropertySet};
|
use glib::{markup_escape_text, Propagation, PropertySet};
|
||||||
use gtk::prelude::*;
|
use gtk::prelude::*;
|
||||||
use gtk::{Button, IconTheme, Label, Orientation, Scale};
|
use gtk::{Button, IconTheme, Label, Orientation, Scale};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
|
@ -531,6 +531,7 @@ fn get_token_value(song: &Track, token: &str) -> String {
|
||||||
"track" => song.track.map(|x| x.to_string()),
|
"track" => song.track.map(|x| x.to_string()),
|
||||||
_ => Some(token.to_string()),
|
_ => Some(token.to_string()),
|
||||||
}
|
}
|
||||||
|
.map(|str| markup_escape_text(str.as_str()).to_string())
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue