Fix clipboard safe string regular expression#2153
Conversation
KoalaSat
left a comment
There was a problem hiding this comment.
Good catch!
Please accept a tip for your work. Paste here a LN invoice for 30,000 sats with a long exploration date.
|
It worked for me building form terminal but now Android Studio complains about the format 🤔 Not sure it this was really the issue |
|
Saying that because I found that this https://github.com/RoboSats/robosats/pull/2154/files#diff-5726100c3de4fda01c1c98e342f00e99339efca15c82e26416c06e70e7f6fef7L112 was causing a lot of troubles and I removed it, which seemed to help |
@KoalaSat It is related to the characters escaping, for Android Studio they might be escaped using two backslashes like it was before but adding the double quotes character. Note This post explains it simply: Keep Your Regular Expression Escapes in Android Let me know if I should open a new PR or if you try it in #2153 |
|
I installed android studio and tried configuring it without much luck (not familiar with mobile dev). I don't get any linting errors or warnings neither. Is there a guide or steps to run the app in the emulator? |
Not really it should be striagh forward. But it's true configuring your Java version and JDK to work with AD is pretty much a hell.
Sounds good 👍 |
|
PR with regex changes: #2155 |
What does this PR do?
Fixes #2152.
This PR updates the regular expression used to validate content pasted to the clipboard by removing extra backslashes and adding the double quote character (
").I haven't tested it though, not sure if characters should be escaped using two backslashes (
\\[) or one (\[). I followed the android documentation https://developer.android.com/reference/kotlin/java/util/regex/PatternBefore
After
Checklist before merging
pip install pre-commit, thenpre-commit install. Pre-commit installs git hooks that automatically check the codebase. If pre-commit fails when you commit your changes, please fix the problems it points out.