Skip to content

fix: reject invalid characters in hashtag input field#338

Merged
barrydeen merged 1 commit into
mainfrom
fix/hashtag-input-validation
Mar 27, 2026
Merged

fix: reject invalid characters in hashtag input field#338
barrydeen merged 1 commit into
mainfrom
fix/hashtag-input-validation

Conversation

@barrydeen
Copy link
Copy Markdown
Owner

Summary

  • Filter hashtag input as-you-type to only allow letters, digits, and underscores
  • Strip a leading # if typed (users naturally type #bitcoin)
  • Remove now-redundant .trim().removePrefix("#") from submit handler and simplify enabled check

Prevents a crash where a user entering #hashtag1, #hashtag2 would store a comma-containing value that breaks the comma-delimited hashtag_set navigation route.

Test plan

  • Type #hashtag1, #hashtag2 in the add-hashtag field — only hashtag1 should appear (comma and everything after is dropped)
  • Type #bitcoin — should appear as bitcoin (leading # stripped)
  • Type a hashtag with spaces — spaces should not be entered
  • Normal hashtag entry and submission still works

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@barrydeen barrydeen merged commit eadf4c8 into main Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant