-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nick highlight should match word boundaries #819
Comments
It also, for the record, highlights when the username is in HTML and not the actual text of the message. |
Yeah, emotes trigger it as well -- maybe walking the DOM tree (after the message is parsed) for TextNodes might address that. |
Why not just use |
Inspecting I also realized if I strip highlights from HTML attributes after emote conversion it might break some legitimate use cases -- for example, people who assign emotes to people's usernames to display an icon instead of text (but still intend to highlight). |
Perhaps sending the initial unfiltered chat message and doing mentions based on that would work? Most of the cases where people want to mention someone would involve them typing it in themselves, so I figure that'd be a better solution. |
Been reported a few times, should be fixed at some point. The current highlight check is
indexOf()
but it should do a regular expression match of word boundaries to avoid triggering on usernames that are substrings of other words.The text was updated successfully, but these errors were encountered: