mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
fix gtk spacial chars warning
This commit is contained in:
parent
c34db6b5f7
commit
9a6c8be37f
2 changed files with 17 additions and 7 deletions
|
|
@ -73,7 +73,7 @@ impl Bookmarks for adw::PreferencesDialog {
|
|||
.format_iso8601()
|
||||
.unwrap(),
|
||||
)
|
||||
.title(group)
|
||||
.title(escape(&group))
|
||||
.build();
|
||||
|
||||
for record in records {
|
||||
|
|
@ -86,7 +86,7 @@ impl Bookmarks for adw::PreferencesDialog {
|
|||
None => record.time.format_iso8601().unwrap().to_string(),
|
||||
})
|
||||
.subtitle_selectable(true)
|
||||
.subtitle(&record.request)
|
||||
.subtitle(escape(&record.request))
|
||||
.build();
|
||||
|
||||
a.add_suffix(&{
|
||||
|
|
@ -126,3 +126,8 @@ impl Bookmarks for adw::PreferencesDialog {
|
|||
d
|
||||
}
|
||||
}
|
||||
|
||||
/// Prevents GTK warnings (`use_markup` has no effect @TODO)
|
||||
fn escape(value: &str) -> String {
|
||||
value.replace("&", "&").replace("&", "&")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue