Skip to content

Conversation

joshreisner
Copy link
Contributor

this PR:

  • fixes '|' character in Search field results in runtime error #471 by improving sanitization
  • moves sanization to a function to be shared with other components
  • prevents invalid characters from from being entered in the input or via URL
  • prevents invalid characters in the search index
  • adds error boundary

@joshreisner joshreisner self-assigned this Sep 29, 2025
Copy link

netlify bot commented Sep 29, 2025

Deploy Preview for tsml-ui ready!

Name Link
🔨 Latest commit 389f20b
🔍 Latest deploy log https://app.netlify.com/projects/tsml-ui/deploys/68daa07c1890c500080374ba
😎 Deploy Preview https://deploy-preview-472--tsml-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@joshreisner joshreisner linked an issue Sep 29, 2025 that may be closed by this pull request
Copy link

@SIA-WEBSUP SIA-WEBSUP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Nice global fix.

One issue that I found in my testing:

  • If you enter a string with all permitted characters 'sober' and move the insertion point to something other than the end, and then type an non-permitted character, the insertion point is moved to the end of the string in the search bar

Not a big deal, but an interesting side effect.

Another issue that comes to mind is how to search for a meeting with one of those excluded characters in their names.

For example if I had a group named "Faithful $5ers", I wouldn't be able to search on "$5"

Not that I could so today anyhow, so perhaps this fix would make this more obvious since I wouldn't be able to type the character into the search field in the first place.

@joshreisner
Copy link
Contributor Author

thanks for testing!

the insertion point is moved to the end

that's fine

if I had a group named "Faithful $5ers", I wouldn't be able to search on "$5"

are you sure? this PR now sanitizes the search index

@SIA-WEBSUP
Copy link

SIA-WEBSUP commented Sep 29, 2025

thanks for testing!

the insertion point is moved to the end

that's fine

sounds good.

if I had a group named "Faithful $5ers", I wouldn't be able to search on "$5"

are you sure? this PR now sanitizes the search index

So the the search index would get "Faithful" "5ers"... hmmm
If someone really did want to look for "$5ers"... they might not realize that their only possible recourse is "5ers".
Anyhoot, it's such an edge case, I doubt too many people will run into this limitation!!

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.

'|' character in Search field results in runtime error
2 participants