Skip to content

gtkbookmarkmanager: Don't allow newlines in the bookmark label

Corey Berla requested to merge wip/corey/bookmark-newline into master

The gtk bookmark file stores bookmarks as follows: <encoded file 1 uri> <file 1 label (optional)> <encoded file 2 uri> <file 2 label (optional)> ...

File names (uri's) with newlines actually function "correctly" because the newlines get encoded as %0A. The label however is not encoded and it would be problematic to start encoding it at this point.

Since the sidebar entries should be 1 line anyways, let's just use our existing eel_str_replace_substring() to change the newline to a space.

Fixes: #1502 (closed)

Merge request reports