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: Prevent filtering highlighting from crashing when match is >10000 chars #3290

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

avinashbot
Copy link
Member

@avinashbot avinashbot commented Feb 12, 2025

Description

Reported by a user on Slack. This is just #1885 but the limit is set even lower. Based on empirical testing, the regex limit seems to be set at 32768 characters now.

We initially set it to 100,000 characters last time to avoid breaking any legitimate workflows and it worked in previous Chrome versions. But in retrospect, autosuggest matches with over 10,000 characters are probably well past most reasonable uses of the component anyway, so this should be fine.

Related links, issue #, if available: n/a

How has this been tested?

Updated the tests.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (645d7db) to head (9f0b5f7).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3290   +/-   ##
=======================================
  Coverage   96.41%   96.41%           
=======================================
  Files         791      791           
  Lines       22563    22563           
  Branches     7786     7726   -60     
=======================================
  Hits        21755    21755           
+ Misses        801      754   -47     
- Partials        7       54   +47     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avinashbot avinashbot marked this pull request as ready for review February 12, 2025 15:45
@avinashbot avinashbot requested a review from a team as a code owner February 12, 2025 15:45
@avinashbot avinashbot requested review from jperals and removed request for a team February 12, 2025 15:45
@avinashbot avinashbot added this pull request to the merge queue Feb 12, 2025
Merged via the queue into main with commit 2966baa Feb 12, 2025
40 checks passed
@avinashbot avinashbot deleted the fix-highlight-mem branch February 12, 2025 16:11
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