-
Notifications
You must be signed in to change notification settings - Fork 800
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
Calendly: Removed look behinds in regexes #14375
Conversation
This isn't supported by Firefox, IE and possibly other browsers
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: January 23, 2020. |
Fixes #14376 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests appear to fail now:
https://travis-ci.org/Automattic/jetpack/jobs/638156137?utm_medium=notification&utm_source=github_status
describe( 'getAttributesFromEmbedCode', () => { |
The new regex wasn't taking into account the case where the embed code could be a bare URL starting with `calendly.com`
pablinos, Your synced wpcom patch D37816-code has been updated. |
Whoops! Thanks @jeherve. That should be fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give this a try. It seems to work on my end!
Changes proposed in this Pull Request:
Look behinds aren't supported by Firefox, IE and some other browsers, which prevented the Calendly block from registering correctly.
This change replaces those regular expressions with ones that use groups to grab what is needed from the string.
Is this a new feature or does it add/remove features to an existing part of Jetpack?
This fixes a bug with the soon to be launched Calendly block
Testing instructions:
With a Jetpack site, activate the beta blocks and test that the different types of embed code can still be used with the Calendly block.
Optionally test it in another browser that doesn't support look behinds e.g. Firefox.
Proposed changelog entry for your changes: