-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Backslash Error #266
Fix Backslash Error #266
Conversation
3b95156
to
5f07953
Compare
…bly null / undefined "searchValue" filed - improved typings to not have to cast them manually, that catches some bugs (and would have caught the one above)
This looks fine now, I tested it locally and it works as expected, I also fixed the error in #196 (comment) (thanks again for finding that) (and thanks @SanderTuit for the fixes in 5f07953 and bumping me again, to make me fix this xD) I feel confident that this works, but I'd wait for some other confirmations, until merging. So please test this if possible ❤️ @analytic-bias @NinZeige @e2ipi-1 @EmixamPP @naiiren (just pinging you, since you have interacted in the issues, maybe you could test this ❤️ ) |
Fix Backslash Error
Description
libgda escapes the string on inserting it into the db. You can't change that behavior (as far as my research goes) So the easiest method to fix this, is to unescape the string on retrieval. This could escape a few things too many, but my testing resulted in no errors and the issues fixed. This could potentially also occur in other fields, not just "content", but I see no possibility to add arbitrary data in any other field and there is no escape character in the hard-coded option / choices of the other strings, or the serialized date etc.
I tested it locally, but it would be great if it would be tested by another one too, I will daily drive this for now and if I discover issues, (like swallowed characters due to unescaping) I will report it, but I think it's safe to use, since it didn't yield any errors from some manual tests with
\
heavy files (latex files).TODO:
Unescaping may fail, since there might be some wrong escape sequences in the string, so if the unescaping fails, we fallback to the escaped string, even if this should never fail, since it was escaped by libgda beforehand.
Fixes #196
Fixes #107
P.S: If this is merged, I also will file a PR to the legacy branch, to fix it in the Gnome < 45 too.
Type of change
Please delete options that are not relevant.
Checklist