[Commits] [SCM] clawsker branch, master, updated. 1.3.5-11-g46cfcd3
mones at claws-mail.org
mones at claws-mail.org
Fri Oct 21 17:03:43 UTC 2022
The branch, master has been updated
via 46cfcd3fe59f76c6bd1212bb9f159180b8cbc573 (commit)
from f491a58277cb9ca6c92478dd1bc2586086ae0d3e (commit)
Summary of changes:
clawsker | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit 46cfcd3fe59f76c6bd1212bb9f159180b8cbc573
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Oct 21 19:01:45 2022 +0200
Fix bug 4641: cannot handle `&` in account names…
The markup parameter of message_dialog has to be escaped as well,
so lets do it, and a few other places.
diff --git a/clawsker b/clawsker
index d4f166a..e5ffa37 100755
--- a/clawsker
+++ b/clawsker
@@ -452,6 +452,7 @@ sub message_dialog {
sub error_dialog {
my ($emsg) = @_;
+ $emsg =~ s/&/&/g;
my $markup = "<span weight=\"bold\" size=\"large\">" . $emsg . "</span>";
my $errordlg = message_dialog (
$main_window, _('Clawsker error'), $markup, 'error', [ 'gtk-cancel', 0 ]
@@ -682,6 +683,7 @@ sub new_label {
sub new_title {
my $text = shift;
$text //= '';
+ $text =~ s/&/&/g;
my $label = Gtk3::Label->new ('<b>' . $text . '</b>');
$label->set_use_markup (TRUE);
$label->set_alignment (0, 0.5);
@@ -2127,6 +2129,7 @@ sub new_accounts_page() {
my $name = $ACPREFS{$_}{'account_name'};
my $isdef = ($ACPREFS{$_}{'is_default'} eq '1');
my $page = new_account_subpage ($_);
+ $name =~ s/&/&/g;
my $label = new_label ($isdef? '<u>' . $name . '</u>': $name);
$label->set_use_markup (TRUE);
$accbook->append_page ($page, $label);
@@ -2355,11 +2358,12 @@ sub new_hotkeys_list {
sub {
my ($col, $renderer, $model, $iter, $data) = @_;
my $hkey = $model->get_value ($iter, C_HOTKEY);
+ my $label = $model->get_value ($iter, C_LABEL);
+ $label =~ s/&/&/g;
my $weight = ($hkey ne '""')? 'weight="bold"': '';
$renderer->set_property (
- 'markup' => "<span size=\"smaller\" $weight>"
- . $model->get_value ($iter, C_LABEL)
- . '</span>');
+ 'markup' => "<span size=\"smaller\" $weight>$label</span>'"
+ );
}
);
my $stylectx = $treeview->get_style_context;
@@ -2886,6 +2890,7 @@ sub exit_handler {
my $markup = "<span>" . _('There are unapplied modifications.')
. "</span>\n\n<span weight=\"bold\">"
. _('Do you really want to quit?') . "</span>\n";
+ $markup =~ s/&/&/g;
my $dialog = message_dialog (
$parent, _('Clawsker warning'), $markup, 'question',
[ 'gtk-no', 1, 'gtk-yes', 0 ]
-----------------------------------------------------------------------
hooks/post-receive
--
Hidden preferences editor for Claws Mail
More information about the Commits
mailing list