Skip to content

Fix bookmark tag editing to keep/remove tags correctly - #1202

Closed
AruneshDwivedi wants to merge 1 commit into
go-shiori:masterfrom
AruneshDwivedi:fix/tag-edit-normalization
Closed

Fix bookmark tag editing to keep/remove tags correctly#1202
AruneshDwivedi wants to merge 1 commit into
go-shiori:masterfrom
AruneshDwivedi:fix/tag-edit-normalization

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Editing a bookmark's tags only added new tags and never removed existing ones because ApiUpdateBookmark matched the incoming tag list against the stored tags case-sensitively on the raw text, while SaveBookmarks stores tags normalized to lowercase with collapsed whitespace. A tag whose casing or spacing changed in the edit box failed to match, so it stayed marked for deletion and was then re-inserted as a duplicate. Matching on the normalized name keeps tags that are still present and stops creating duplicates. Fixes #1167.

SaveBookmarks normalizes tag names to lowercase with collapsed whitespace, but ApiUpdateBookmark matched new tags against stored tags case-sensitively on the raw input. A tag edited with different casing or extra spaces failed to match, so it stayed marked for deletion and was re-added as a duplicate instead of being kept. Matching on the normalized form keeps existing tags and stops creating duplicates.
@AruneshDwivedi AruneshDwivedi closed this by deleting the head repository Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not remove tag of existing bookmark

1 participant