Skip to content

Commit

Permalink
Pass --no-markup to zenity (#205)
Browse files Browse the repository at this point in the history
zenity will replace any dialog text that contains the characters `<` or `>` with a generic error message, because it tries to interpret those characters as pango markup.

This patch should prevent that from happening.
  • Loading branch information
SludgePhD authored Jul 5, 2024
1 parent fa24088 commit 1791c98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Move from `objc` crates to `objc2` crates.
- Fix `AsyncFileDialog` blocking the executor on Windows (#191)
- Add `TDF_SIZE_TO_CONTENT` to `TaskDialogIndirect` config so that it can display longer text without truncating/wrapping (80 characters instead of 55) (#202)
- Fix `xdg-portal` backend not accepting special characters in message dialogs

## 0.14.0
- i18n for GTK and XDG Portal
Expand Down
4 changes: 3 additions & 1 deletion src/backend/linux/zenity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ impl From<std::string::FromUtf8Error> for ZenityError {
pub type ZenityResult<T> = Result<T, ZenityError>;

fn command() -> Command {
Command::new("zenity")
let mut cmd = Command::new("zenity");
cmd.arg("--no-markup");
cmd
}

fn add_filters(command: &mut Command, filters: &[Filter]) {
Expand Down

0 comments on commit 1791c98

Please sign in to comment.