8000 [DataObject] Input Field - RegEx: replace default unicode flag with Flags option in class definition by dvesh3 · Pull Request #11586 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[DataObject] Input Field - RegEx: replace default unicode flag with Flags option in class definition #11586

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

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

dvesh3
Copy link
Contributor
@dvesh3 dvesh3 commented Mar 3, 2022

Changes in this pull request

Fixes #11280
Fixes #11578
Fixes #11033 #11056

Additional info

image

@kingjia90
Copy link
Contributor

The change looks good to me, just stumbled upon a related issue.

There are some discrenpancies betweeen PHP and Javascript Regex.

https://regex101.com/r/fFr5ty/1
image

In red, the JS without Unicode flag and in green the JS with the Unicode flag, works as expected in the frontend (and mentioned in #11056)
In yellow, PHP works without the Unicode flag, so it won't change if is set or not

@dvesh3
Copy link
Contributor Author
dvesh3 commented Mar 15, 2022

The change looks good to me, just stumbled upon a related issue.

There are some discrenpancies betweeen PHP and Javascript Regex.

In red, the JS without Unicode flag and in green the JS with the Unicode flag, works as expected in the frontend (and mentioned in #11056) In yellow, PHP works without the Unicode flag, so it won't change if is set or not

PHP support Unicode expressions by default so doesn't matter if add the flag or not. For javascript, It is important to set the flag.

@dvesh3 dvesh3 force-pushed the input_regex_flags branch from 9085892 to 05a7fad Compare March 15, 2022 15:01
@dvesh3 dvesh3 changed the base branch from 10.x to 10.3 March 15, 2022 15:01
@kingjia90 kingjia90 merged commit dc3bc9c into 10.3 Mar 15, 2022
@kingjia90 kingjia90 deleted the input_regex_flags branch March 15, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot configure VoucherSeries with VoucherTokenTypePattern [Bug]: Invalid input regex crashes admin view
2 participants
0