Invalid tag characters are accepted

Steps to reproduce

  1. In a note, make the tag #😐 and #exam❋ple.
  2. Click/tap it.

Did you follow the troubleshooting guide? [Y

Y

Expected result

Because 😐 and ❋ aren’t alphabetical letters, numbers, or allowed punctuation according to https://help.obsidian.md/tags#Tag+format, I’d expect #😐 to not register as a tag and #exam❋ple to register as tag #exam abutting plain text ❋ple.

I’d also expect a tag: search for either to return 0 matches.

Actual result

The emoji registers as a tag, and clicking it opens a tag search that matches it. (When this report was first posted, the same was true for an example containing an asterisk, but as of v1.12.4 or earlier it doesn’t.)

Environment

SYSTEM INFO:
Operating system: ios 18.6.2 (Apple iPhone14,5)
Obsidian version: 1.9.12 (237)
API version: v1.9.12
Login status: logged in
Language: en
Catalyst license: none
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

I’d guess this has been broken for a long time, because people have been using emoji tags for years (I used to hear about them regularly but don’t anymore). See the numerous results in Search results for 'Emoji tag' - Obsidian Forum. Some of those are from people wondering why their emoji tags didn’t work, but the cause of that turned out to be one or another plugin.

This report was sparked by a question on Discord:

does anyone know if there’s a way to allow the linter plugin to recognize special unicode characters? i’m trying to have it move tags to frontmatter but it’s wigging out because the formatting is a little weird; the tag in the body is something like _#tag/6❋nested and it’s changing it to _tag/6 without the unicode asterisk and other portion of it. (Discord)

And the ensuing conversation: Discord.

I’ve updated the main post. I haven’t tested much more but it looks like only emoji are incorrectly accepted now. I tested $ in response to a message on Discord and that behaves correctly too.

The help page does not mention the other specials “$” specifically here so I was groaning a bit having a huge trove of $XYZ etc… old tags from Evernote that would need to be changed in Obsidian I guess to use. (Discord)