Open jnlon opened 4 years ago
Great work! I hope your fixes get merged soon.
Ug. Just had this happen. Is there anyway to save my book marks, or must I start over?
@softgenix As far as I can tell there are 2 conditions where it is possible:
You have root on your device
You are running a debug build of the app (ie, not from F-droid)
If either is true you can retrieve the bookmarks with ADB. If you have root and its enabled for ADB in developer settings, this prints your bookmarks to the command-line:
adb root && adb shell cat /data/data/com.gmail.afonsotrepa.pocketgopher/files/bookmarks
Same thing but for debug builds, this works on my device:
adb shell run-as com.gmail.afonsotrepa.pocketgopher cat /data/data/com.gmail.afonsotrepa.pocketgopher/files/bookmarks
When bookmarking a page with a 'tab' character in the URL, PocketGopher will crash on startup and not start again until app data is cleared. This is because the bookmarks file is tab delimited, and the extra field causes an exception from parseInt. To prevent raw tab characters from ending up in the bookmarks file, this PR calls url encode/decode before reading/writing urls to the bookmarks file. This is also backwards compatible since URLDecode ignores special characters that would normally be url-encoded, so old bookmarks still work.