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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Use lazy quantifier in regex for sanitizing dates in js_to_json #8295

Merged
merged 1 commit into from Oct 7, 2023

Commits on Oct 7, 2023

  1. [core] Fix regex for sanitizing date constructor in js_to_json

    Given the following JavaScript code as string:
    
        [new Date("foobar"), '("baz")']
    
    The greedy quantifier's usage matches the string till the last quote instead of just the text inside the parenthesis. This patch fixes that using the `STRING_RE` regex for matching string literals properly.
    
    Also updated tests.
    awalgarg committed Oct 7, 2023
    Copy the full SHA
    927f919 View commit details
    Browse the repository at this point in the history