Skip to content

Make sure autocomplete triggers are regex safe#10785

Merged
notnownikki merged 1 commit intomasterfrom
fix/regex-safe-autocomplete-triggers
Oct 19, 2018
Merged

Make sure autocomplete triggers are regex safe#10785
notnownikki merged 1 commit intomasterfrom
fix/regex-safe-autocomplete-triggers

Conversation

@notnownikki
Copy link
Copy Markdown
Member

@notnownikki notnownikki commented Oct 19, 2018

Description

Fixes: #10781

Make sure autocomplete triggers are made safe for use in regex.

How has this been tested?

Install and test the autocomplete example from #10781

Types of changes

Bug fix

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@notnownikki notnownikki requested a review from ellatrix October 19, 2018 08:53
@notnownikki
Copy link
Copy Markdown
Member Author

@georgeh @mkaz If this is an acceptable fix, we might want to carry this as a patch until the next release.

@ellatrix
Copy link
Copy Markdown
Member

Tbh, I do not remember writing anything like this, but maybe I did. Others have collaborated on the Autocomplete component in the few-times-squashed 78d1254, but this may very well me my mistake, if so, apologies! :)

Copy link
Copy Markdown
Member

@ellatrix ellatrix left a comment

Choose a reason for hiding this comment

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

Looks good!

@notnownikki
Copy link
Copy Markdown
Member Author

Thanks for the review :) To be honest I just pinged you because 1) your name was on the merge, and 2) reviews from you are always appreciated!

@notnownikki notnownikki merged commit ab9b4a2 into master Oct 19, 2018
@youknowriad youknowriad added this to the 4.1 - UI freeze milestone Oct 19, 2018
@youknowriad youknowriad deleted the fix/regex-safe-autocomplete-triggers branch October 19, 2018 09:44
@mtias mtias added the [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable label Oct 19, 2018
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Autocompleters crash if the trigger has special meaning in a regex

4 participants