Skip to content
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

Fix: Escape special characters in mentioned users names #591

Merged
merged 2 commits into from
Oct 28, 2020

Conversation

jaapbakker88
Copy link
Contributor

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

@jaapbakker88 jaapbakker88 changed the title scape special characters in mentioned users names Escape special characters in mentioned users names Oct 27, 2020
@github-actions
Copy link

github-actions bot commented Oct 27, 2020

Size Change: +297 B (0%)

Total Size: 1.26 MB

Filename Size Change
./dist/browser.full-bundle.js 644 kB +78 B (0%)
./dist/browser.full-bundle.min.js 372 kB +56 B (0%)
./dist/index.es.js 105 kB +82 B (0%)
./dist/index.js 107 kB +81 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/css/index.css 23 kB 0 B
./dist/css/index.js 21 B 0 B
./dist/i18n/en.json 824 B 0 B
./dist/i18n/fr.json 1.25 kB 0 B
./dist/i18n/hi.json 1.43 kB 0 B
./dist/i18n/it.json 1.19 kB 0 B
./dist/i18n/nl.json 1.17 kB 0 B
./dist/i18n/ru.json 1.47 kB 0 B
./dist/i18n/tr.json 1.19 kB 0 B

compressed-size-action

@jaapbakker88 jaapbakker88 changed the title Escape special characters in mentioned users names Fix: Escape special characters in mentioned users names Oct 27, 2020
Copy link

@ath92 ath92 left a comment

Choose a reason for hiding this comment

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

LGTM. One note though: if a username contains any of the characters we're now escaping, it won't properly highlight the mention, right? Should this be documented somewhere?

@mahboubii
Copy link
Contributor

LGTM. One note though: if a username contains any of the characters we're now escaping, it won't properly highlight the mention, right? Should this be documented somewhere?

it uses the name and if missing fallback to id, this change actually solves the issue of not highlighting or breaking where a name has one of those special chars.

@jaapbakker88 jaapbakker88 merged commit dcaaf02 into master Oct 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix/mentioned-users branch October 28, 2020 09:16
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.

3 participants