
By the way, emojis do not cause any problems. Also when I want to delete projects via the sidebar, the correct project title with its special character is shown in the delete dialog.
EDIT: I have tried to find out what happens when a project title has other and several special characters in its name. Therefore I renamed an existing project. To "Test&++". If I now try to delete the project, the dialog window only shows me the old project name. I would expect it to update itself automatically.
EDIT2: After a restart of Planner and a new try to delete the renamed project "Test&++" via the sidebar, the dialog shows again what was described in the screenshot above for the areas. The title is completely missing.
This seems to be a problem with Granite, I'm going to send an issue to find out what's going on.
I've been seeing this error and I've realized that using this special character causes errors when synchronizing with Todoist, when displaying the alerts, etc.
My solutions are:
And or a space.I'm leaning toward option 2.
What about solution 3: Possibility to display special characters correctly? Special characters are often an integral part of a language. They may not be replaceable or at least not as easy as the example "&".
Where do you see the connection to the problem of synchronization with Todoist? There are some people who use Planner only locally. They shouldn't be affected by this, right?
Ampersand ('&') becomes invisible.
The special character & becomes invisible in the task header - gets replaced by a white space .

馃憞馃徎

@joe733 Yes. For the moment it's a solution. I'm still looking for a way to use &
This problem seems to be related to this: https://developer.gnome.org/pygtk/stable/class-gtkmessagedialog.html
"The set_markup() method sets the text of the message dialog to the contents of str. If str contains text marked up with Pango markup (see The Pango Markup Language), it will be displayed with those attributes. Note the '<', '>' and '&' characters must be replaced with '<', '>' and '&' respectively to be displayed literally."
With a few changes, I was able to correct this problem (ignore the design):

But this creates a new one:

Here is the patch:
```patch
diff --git a/src/Objects/Area.vala b/src/Objects/Area.vala
index e55689bc..86e65cd4 100644
--- a/src/Objects/Area.vala
+++ b/src/Objects/Area.vala
@@ -25,7 +25,7 @@ public class Objects.Area : GLib.Object {
public string _name = "";
public string name {
get { return _name; }
- set { _name = value.replace ("&", " "); }
+ set { _name = value; }
}
public string date_added { get; set; default = new GLib.DateTime.now_local ().to_string (); }
diff --git a/src/Objects/Item.vala b/src/Objects/Item.vala
index 59453ecf..544d7f05 100644
--- a/src/Objects/Item.vala
+++ b/src/Objects/Item.vala
@@ -38,7 +38,7 @@ public class Objects.Item : GLib.Object {
public string _content = "";
public string content {
get { return _content; }
- set { _content = value.replace ("&", " "); }
+ set { _content = value; }
}
public string note { get; set; default = ""; }
diff --git a/src/Objects/Label.vala b/src/Objects/Label.vala
index 71943178..fa47d220 100644
--- a/src/Objects/Label.vala
+++ b/src/Objects/Label.vala
@@ -26,7 +26,7 @@ public class Objects.Label : GLib.Object {
public string _name = "";
public string name {
get { return _name; }
- set { _name = value.replace ("&", " "); }
+ set { _name = value; }
}
public int color { get; set; default = GLib.Random.int_range (39, 50); }
diff --git a/src/Objects/Project.vala b/src/Objects/Project.vala
index 403ca515..74e18096 100644
--- a/src/Objects/Project.vala
+++ b/src/Objects/Project.vala
@@ -25,7 +25,7 @@ public class Objects.Project : GLib.Object {
public string _name = "";
public string name {
get { return _name; }
- set { _name = value.replace ("&", " "); }
+ set { _name = value; }
}
public string note { get; set; default = ""; }
public string due_date { get; set; default = ""; }
diff --git a/src/Objects/Section.vala b/src/Objects/Section.vala
index c327f2a4..e2634d7c 100644
--- a/src/Objects/Section.vala
+++ b/src/Objects/Section.vala
@@ -26,7 +26,7 @@ public class Objects.Section : GLib.Object {
public string _name = "";
public string name {
get { return _name; }
- set { _name = value.replace ("&", " "); }
+ set { _name = value; }
}
public string note { get; set; default = ""; }
public int item_order { get; set; default = 0; }
diff --git a/src/Utils.vala b/src/Utils.vala
index 0fa08f0e..9cbdbeeb 100644
--- a/src/Utils.vala
+++ b/src/Utils.vala
@@ -1095,6 +1095,10 @@ public class Utils : GLib.Object {
return newtext;
}
}
+
public void parse_item_tags (Objects.Item item, string text) {
var clean_text = "";
Regex word_regex = /S+s*/;
diff --git a/src/Views/Project.vala b/src/Views/Project.vala
index 49b6f380..1440fcb9 100644
--- a/src/Views/Project.vala
+++ b/src/Views/Project.vala
@@ -1115,7 +1115,7 @@ public class Views.Project : Gtk.EventBox {
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
_("Delete project"),
diff --git a/src/Widgets/AreaRow.vala b/src/Widgets/AreaRow.vala
index 3df85c3e..d89daf01 100644
--- a/src/Widgets/AreaRow.vala
+++ b/src/Widgets/AreaRow.vala
@@ -677,7 +677,7 @@ public class Widgets.AreaRow : Gtk.ListBoxRow {
delete_menu.activate.connect (() => {
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
_("Delete folder"),
- _("Are you sure you want to delete %s?".printf (area.name)),
+ _("Are you sure you want to delete %s?".printf (Planner.utils.get_dialog_text(area.name))),
"user-trash-full",
Gtk.ButtonsType.CLOSE
);
diff --git a/src/Widgets/ItemCompletedRow.vala b/src/Widgets/ItemCompletedRow.vala
index 2ed73efa..f43998bd 100644
--- a/src/Widgets/ItemCompletedRow.vala
+++ b/src/Widgets/ItemCompletedRow.vala
@@ -213,7 +213,7 @@ public class Widgets.ItemCompletedRow : Gtk.ListBoxRow {
delete_menu.activate.connect (() => {
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
_("Delete task"),
- _("Are you sure you want to delete %s?".printf (item.content)),
+ _("Are you sure you want to delete %s?".printf (Planner.utils.get_dialog_text(item.content))),
"user-trash-full",
Gtk.ButtonsType.CANCEL);
diff --git a/src/Widgets/ProjectRow.vala b/src/Widgets/ProjectRow.vala
index 0982f43a..14779007 100644
--- a/src/Widgets/ProjectRow.vala
+++ b/src/Widgets/ProjectRow.vala
@@ -585,7 +585,7 @@ public class Widgets.ProjectRow : Gtk.ListBoxRow {
delete_menu.activate.connect (() => {
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
_("Delete project"),
- _("Are you sure you want to delete %s?".printf (project.name)),
+ _("Are you sure you want to delete %s?".printf (Planner.utils.get_dialog_text(project.name))),
"user-trash-full",
Gtk.ButtonsType.CANCEL);
diff --git a/src/Widgets/SectionRow.vala b/src/Widgets/SectionRow.vala
index d8e74c14..2b817292 100644
--- a/src/Widgets/SectionRow.vala
+++ b/src/Widgets/SectionRow.vala
@@ -866,7 +866,7 @@ public class Widgets.SectionRow : Gtk.ListBoxRow {
delete_menu.activate.connect (() => {
var message_dialog = new Granite.MessageDialog.with_image_from_icon_name (
_("Delete section"),
- _("Are you sure you want to delete %s?".printf (section.name)),
+ _("Are you sure you want to delete %s?".printf (Planner.utils.get_dialog_text(section.name))),
"user-trash-full",
Gtk.ButtonsType.CANCEL);
```
Do you see a way to solve the problem completely?
@yannicka Thank you very much, it is a good solution.
Solved, Thank you @yannicka, your work was very helpful.

Most helpful comment
Solved, Thank you @yannicka, your work was very helpful.
