1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Mobile: Fixes #4494: Fixed opening URLs that contain non-alphabetical characters

This commit is contained in:
Laurent Cozic 2021-05-19 16:48:55 +02:00
parent bd08041f53
commit 85211e8d5c

View File

@ -3,8 +3,13 @@ const shared = require('@joplin/lib/components/shared/note-screen-shared');
export default function useOnMessage(onCheckboxChange: Function, noteBody: string, onMarkForDownload: Function, onJoplinLinkClick: Function, onResourceLongPress: Function) {
return useCallback((event: any) => {
// Since RN 58 (or 59) messages are now escaped twice???
const msg = unescape(unescape(event.nativeEvent.data));
// 2021-05-19: Historically this was unescaped twice as it was
// apparently needed after an upgrade to RN 58 (or 59). However this is
// no longer needed and in fact would break certain URLs so it can be
// removed. Keeping the comment here anyway in case we find some URLs
// that end up being broken after removing the double unescaping.
// https://github.com/laurent22/joplin/issues/4494
const msg = event.nativeEvent.data;
console.info('Got IPC message: ', msg);