achorein / expo-share-intent

🚀 Simple share intent in an Expo Native Module
MIT License
128 stars 13 forks source link

Exception when special characters in shared text #20

Closed simonsturge closed 4 months ago

simonsturge commented 4 months ago

Hi, and thank you for the effort you've put into this package.

When sharing text with special characters, for example line breaks, the app will crash when trying to parse the share intent.

Steps to reproduce: Copy text with new lines e.g.

github

App will crash with the following debug log:

DEBUG  useShareIntent[onChange] {"value": "{ \"text\": \"Accelerate innovation
Our\" }"}
ERROR  SyntaxError: JSON Parse error: U+0000 thru U+001F is not allowed in string, js engine: hermes
achorein commented 4 months ago

need two fixes :

achorein commented 4 months ago

fixed in 1.1.0