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

Unescaped address causes javascript error #2

Open
aurelien-cd opened this issue Apr 20, 2023 · 2 comments
Open

Unescaped address causes javascript error #2

aurelien-cd opened this issue Apr 20, 2023 · 2 comments

Comments

@aurelien-cd
Copy link

When the billing address contains a simple quote, it causes a javascript error preventing Stripe form to be displayed.
This situation occurs, for exemple, for some french cities (L'union).

https://github.com/lunarphp/stripe/blob/634e396395a0059f21c77c2a4a8aa74ccdf2bb5b/resources/views/stripe/components/payment-form.blade.php#L11-L18

Maybe these strings should be escaped with addcslashes

@glennjacobs
Copy link
Contributor

Maybe we should be using something like {{ Illuminate\Support\Js::from($array) }};

@alecritson alecritson transferred this issue from lunarphp/stripe Apr 21, 2023
@alecritson
Copy link
Contributor

Not sure if that would work since the fields won't be 1:1, we could look at blade directives or create one we can use across all add ons which might have this problem.

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

No branches or pull requests

3 participants