tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
394 stars 70 forks source link

Encode subject #125

Open fansilva1991 opened 1 year ago

fansilva1991 commented 1 year ago

Description

This PR adds the ability to apply encodeURIComponent to the subject.

Related to issue:

https://github.com/includable/react-native-email-link/issues/118

tschoffelen commented 1 year ago

Thanks for opening this!

Shouldn't we make this a default behaviour for the particular situation addressed in #118? E.g. always URL-encode when on iOS and the default client is selected?

Of course that is a breaking change, but I'm happy to release that as a v2 of the library, together with some other cleanup.

hazyikmis commented 1 year ago

Shouldn't we add this prop (encodeSubject) also to the ComposeOptions type defined in the index.d.ts. encodeBody is also missing.