[GH-ISSUE #7475] [Bug]: Tags end on whitespace #17328

Closed
opened 2026-04-14 20:12:19 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @rmsppu on GitHub (Apr 11, 2026).
Original GitHub issue: https://github.com/actualbudget/actual/issues/7475

What happened?

The documentation regarding tags (https://actualbudget.org/docs/transactions/tags) states:

A tag is a string of any characters (except #) prefixed by the # symbol

An arbitrary string may be entered as a "tag", but only the first non-whitespace series of characters are used in tag operations.

How can we reproduce the issue?

  1. Append a tag to a transaction (either via a rule or by selecting the transaction, going to the dropdown menu to modify the selected transaction and selecting Notes) with the content: #Tag one (with an inital space before "#").
  2. Repeat step 1, appending the content Tag two to a different transaction.
  3. Filter the list of transactions, by selecting "Notes" as the field, "has tags" and "#Tag one" as the value.

The expected behavior is that only the transaction modified in step one, to have the Notes content "#Tag one" would be matched by this filter.

The actual behavior is that all transactions with the notes content "#Tag" are matched, regardless of any string after the whitespace (ie., "#Tag one", "#Tag two", and "#Tag this is some arbitrary text" are all treated as only having "#Tag").

  • Preferred resolution:
    Correct the handling of strings that are considered tags to allow whitespace within a tag.

  • Alternative resolution:
    Update the documentation to match the existing behavior, by stating:

A tag is a string of any non-whitespace characters (except #) prefixed by the # symbol. Tags are separated by whitespace.

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox, Chrome

Operating System

Linux

Originally created by @rmsppu on GitHub (Apr 11, 2026). Original GitHub issue: https://github.com/actualbudget/actual/issues/7475 ### What happened? The documentation regarding tags (https://actualbudget.org/docs/transactions/tags) states: > A tag is a string of any characters (except #) prefixed by the # symbol An arbitrary string may be entered as a "tag", but only the first non-whitespace series of characters are used in tag operations. ### How can we reproduce the issue? 1. Append a tag to a transaction (either via a rule or by selecting the transaction, going to the dropdown menu to modify the selected transaction and selecting Notes) with the content: `#Tag one` (with an inital space before "**#**"). 2. Repeat step 1, appending the content **Tag two** to a different transaction. 3. Filter the list of transactions, by selecting "**Notes**" as the field, "**has tags**" and "**#Tag one**" as the value. The expected behavior is that only the transaction modified in step one, to have the Notes content "**#Tag one**" would be matched by this filter. The actual behavior is that all transactions with the notes content "**#Tag**" are matched, regardless of any string after the whitespace (ie., "**#Tag one**", "**#Tag two**", and "**#Tag this is some arbitrary text**" are all treated as only having "**#Tag**"). * Preferred resolution: Correct the handling of strings that are considered tags to allow whitespace within a tag. * Alternative resolution: Update the documentation to match the existing behavior, by stating: > A tag is a string of any non-whitespace characters (except #) prefixed by the # symbol. Tags are separated by whitespace. ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox, Chrome ### Operating System Linux
GiteaMirror added the needs triagebug labels 2026-04-14 20:12:19 -05:00
Author
Owner

@Juulz commented on GitHub (Apr 11, 2026):

Although the screenshot in the doc makes it clear that the tag ends with a space or another tag, it's not specifically stated in the text. When you look at the note or at the tag management page, only the actual tag is in the pill.

<!-- gh-comment-id:4230170836 --> @Juulz commented on GitHub (Apr 11, 2026): Although the screenshot in the doc makes it clear that the tag ends with a space or another tag, it's not specifically stated in the text. When you look at the note or at the tag management page, only the actual tag is in the pill.
Author
Owner

@rmsppu commented on GitHub (Apr 11, 2026):

Although the screenshot in the doc makes it clear that the tag ends with a space or another tag, it's not specifically stated in the text. When you look at the note or at the tag management page, only the actual tag is in the pill.

It depends on how you define "the actual tag". According to the written documentation, the tag should allow embedded whitespace. This behavior is consistent with other parts of Actual Budget, such as the fact that appending text to a note does not separate the new text from the old text with whitespace (ie., that whitespace is not treated as special characters, and that only the # has semantic value for separating tags).

I've created ~50+ tags with whitespace that are compliant with the documentation, and these are applied to ~2K transactions. The inconsistent tag handling makes it difficult to use these tags, since tags like "#Family gift (parents)", "#Family gift (siblings)", and "#Family visit travel expense" are all treated as the string "#Family".

<!-- gh-comment-id:4230191342 --> @rmsppu commented on GitHub (Apr 11, 2026): > Although the screenshot in the doc makes it clear that the tag ends with a space or another tag, it's not specifically stated in the text. When you look at the note or at the tag management page, only the actual tag is in the pill. It depends on how you define "the actual tag". According to the written documentation, the tag should allow embedded whitespace. This behavior is consistent with other parts of Actual Budget, such as the fact that appending text to a note does not separate the new text from the old text with whitespace (ie., that whitespace is not treated as special characters, and that only the # has semantic value for separating tags). I've created ~50+ tags with whitespace that are compliant with the documentation, and these are applied to ~2K transactions. The inconsistent tag handling makes it difficult to use these tags, since tags like "#Family gift (parents)", "#Family gift (siblings)", and "#Family visit travel expense" are all treated as the string "#Family".
Author
Owner

@Juulz commented on GitHub (Apr 11, 2026):

It depends on how you define "the actual tag".

What is in the pill is the actual tag, the rest of the stuff in the notes are just notes.

I've created ~50+ tags with whitespace

How many tags are in your tag management page? Do any of them have embedded spaces?

<!-- gh-comment-id:4230195878 --> @Juulz commented on GitHub (Apr 11, 2026): > It depends on how you define "the actual tag". What is in the pill is the actual tag, the rest of the stuff in the notes are just notes. > I've created ~50+ tags with whitespace How many tags are in your tag management page? Do any of them have embedded spaces?
Author
Owner

@rmsppu commented on GitHub (Apr 11, 2026):

It depends on how you define "the actual tag".

What is in the pill is the actual tag, the rest of the stuff in the notes are just notes.

I've created ~50+ tags with whitespace

How many tags are in your tag management page? Do any of them have embedded spaces?

I've got ~250 tags now, down from ~4K (yes, you read that correctly). I imported several years of bank transactions, many of which contain info like "Withdrawal at ATM #123" or "Withdrawal POS at Grocery #456" or "Deposit Check #789", resulting in a tremendous number of useless tags (and a similar number of almost-useless Payees).

Looking at the tag management page, none of them have embedded spaces. Urgh. Now to try to write regular expressions to turn spaces between tags into underscores, change rules that create tags to use underscores, change rules to use underscores when matching tag names, and change my Report filters that tried to match on tags with embedded spaces.

<!-- gh-comment-id:4230214920 --> @rmsppu commented on GitHub (Apr 11, 2026): > > It depends on how you define "the actual tag". > > What is in the pill is the actual tag, the rest of the stuff in the notes are just notes. > > > I've created ~50+ tags with whitespace > > How many tags are in your tag management page? Do any of them have embedded spaces? I've got ~250 tags now, down from ~4K (yes, you read that correctly). I imported several years of bank transactions, many of which contain info like "Withdrawal at ATM #123" or "Withdrawal POS at Grocery #456" or "Deposit Check #789", resulting in a tremendous number of useless tags (and a similar number of almost-useless Payees). Looking at the tag management page, none of them have embedded spaces. Urgh. Now to try to write regular expressions to turn spaces between tags into underscores, change rules that create tags to use underscores, change rules to use underscores when matching tag names, and change my Report filters that tried to match on tags with embedded spaces.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#17328