Using the `/add-text` x-url with the `tags` parameter produces strange results

  • Bear Version: 2.8.1
  • OS Version: 26.4.1

Run the following url twice in a row: bear://x-callback-url/add-text?title=My_note&text=line1%0Aline2&mode=append&show_window=yes&tags=my_tag

If Bear is set to add tags at “Top of note” then it inserts the tag after the first line of text.

# My_note
line1
#my_tag
line2
line1
line2

If Bear is set to add tags at “Bottom of note” then it adds a newline to each entry:

# My_note
line1
line2

line1
line2

#my_tag

Thanks for reporting this issue. Will be fixed with the next update.

1 Like

Can confirm it’s fixed in 2.8.2 :tada:

Unfortunately though this release seems to have introduced a new bug. If I run bear://x-callback-url/add-text?title=My_note&text=foo&mode=append&show_window=yes&tags=my_tag when My note doesn’t exist, it doesn’t add the tag to the note. When run on a preexisting note it’s added correctly.

This has always been the case. /add-text and /add-file require the note to exists to work.

In 2.8.1 it would add the tag. Unless this was unintentional behavior?

The code for checking the existence of the note has been there since 2017, but maybe something slipped in the previous release.