fix(list): title encoding & decoding

fix: #68
This commit is contained in:
Evangelos Paterakis 2023-01-30 15:14:58 +02:00
parent 79c211c9e0
commit c71e1cec3c
No known key found for this signature in database
GPG Key ID: FE5185F095BFC8C9
1 changed files with 5 additions and 2 deletions

View File

@ -43,7 +43,10 @@ public class Tooth.Views.Lists : Views.Timeline {
this.list = list;
if (list != null) {
this.list.bind_property ("title", this, "title", BindingFlags.SYNC_CREATE);
this.list.bind_property ("title", this, "title", BindingFlags.SYNC_CREATE, (b, src, ref target) => {
target.set_string (GLib.Markup.escape_text(src.get_string ()));
return true;
});
edit_button.clicked.connect(() => {
create_edit_preferences_window(this.list).show();
});
@ -227,7 +230,7 @@ public class Tooth.Views.Lists : Views.Timeline {
this.list.replies_policy = replies_policy;
new Request.PUT (@"/api/v1/lists/$(t_list.id)")
.with_account (accounts.active)
.with_param ("title", title)
.with_param ("title", HtmlUtils.uri_encode(title))
.with_param ("replies_policy", replies_policy)
.then(() => {})
.exec ();