Arsenal21 / stripe-payments

Stripe Payments Plugin for WordPress
11 stars 8 forks source link

Allow email aliases using + sign within their name #194

Closed ovidiubica closed 3 years ago

ovidiubica commented 3 years ago

Fixes #193

Arsenal21 commented 3 years ago

Thank you @ovidiubica. It looks good to me. @erommel can you please review the changes and merge of it looks fine?

erommel commented 3 years ago

@ovidiubica , the idea with encodeURIComponent() function is great! However, it's applied a bit improperly.

Currently, it's encoding input element but not it's value. The output of encodeURIComponent(document.getElementById('email')); would be "%5Bobject%20HTMLInputElement%5D", which is not that we need.

So you should encode element value instead, not the element itself. Also keep in mind there are several occurrences of emailInput.value, make sure all of them are properly encoded.

Arsenal21 commented 3 years ago

Thanks @ovidiubica