Skip to content

Commit b31c9a0

Browse files
authored
Merge pull request #2139 from bb2/patch-2
UI: Decode URL in text field for better readability
2 parents 1d55ca5 + 69d46d1 commit b31c9a0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

radicale/web/internal_data/js/scenes/CollectionsScene.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class CollectionsScene {
124124
_ondelete(collection) {
125125
try {
126126
let delete_collection_scene = new DeleteConfirmationScene(
127-
this._user, this._password, "Delete Collection", collection, collection.displayname || collection.href,
127+
this._user, this._password, "Delete Collection", collection, collection.displayname || decodeURIComponent(collection.href),
128128
delete_collection, true
129129
);
130130
push_scene(delete_collection_scene);
@@ -253,7 +253,7 @@ export class CollectionsScene {
253253
edit_btn.classList.add("hidden");
254254
}
255255
}
256-
title_form.textContent = collection.displayname || collection.href;
256+
title_form.textContent = collection.displayname || decodeURIComponent(collection.href);
257257
if (title_form.textContent.length > 30) {
258258
title_form.classList.add("smalltext");
259259
}

radicale/web/internal_data/js/scenes/CreateEditCollectionScene.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class CreateEditCollectionScene {
196196
this._remove_invalid_types();
197197
this._html_scene.classList.remove("hidden");
198198
if (this._edit && this._title_form) {
199-
this._title_form.textContent = this._collection.displayname || this._collection.href;
199+
this._title_form.textContent = this._collection.displayname || decodeURIComponent(this._collection.href);
200200
}
201201
this._fill_form();
202202
this._submit_btn.onclick = () => this._onsubmit();
@@ -230,4 +230,4 @@ export class CreateEditCollectionScene {
230230
return extract_title(this._collection);
231231
}
232232

233-
}
233+
}

0 commit comments

Comments
 (0)