Fringe case (probably)
A user can type something that looks like a tag <foo>bar</baz> and the app will show it as such but WordPress actually filteres the <foo> and </baz>. The category is actually bar.
It might be easiest if the app fetched the canonical category from the site vs trying to filter edge cases like this client side.