ankidroid / ankidroid/Anki-Android
AnkiDroid search parses NBSP differently from Anki Desktop
- Ngôn ngữ chính
- Kotlin
- Star
- 11.8k
- Fork
- 2.9k
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 171
Mô tả
### Checked for duplicates?
- [x] This issue is not a duplicate
### Does it also happen in the desktop version?
- [x] This bug does not occur in the latest version of Anki Desktop
### What are the steps to reproduce this bug?
AnkiDroid appears to parse a non-breaking space (`U+00A0`) differently from Anki Desktop when it occurs before the `OR` operator in a Browser search.
### Steps to reproduce
1. Create notes tagged `t1`, `t2`, and `t3`.
2. In the Browser, run this search, where the space between `tag:t2` and `OR` is a non-breaking space (`U+00A0`):
`deck:current (tag:t3 OR tag:t2 OR tag:t1) -is:buried -is:suspended`
3. Compare the result in AnkiDroid and Anki Desktop.
### Actual behavior
On AnkiDroid, the search returns only notes tagged `t3`.
On Anki Desktop (26.08.1), the same search returns notes tagged `t1`, `t2`, or `t3` as expected.
### Expected behaviour
AnkiDroid should handle `U+00A0` consistently with Anki Desktop, either treating it as whitespace in the search expression or otherwise producing the same search result.
...Or throw an error, but at least not fail silently.
### Debug info
```text
AnkiDroid Version = 2.24.1 (9f579c10bb151146728220729c510acbbd8faba7)
Backend Version = 0.1.64-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)
Android Version = 13 (SDK 33)
ProductFlavor = full
Device Info = LGE | lge | timelm | timelm | LM-V600 | timelm
WebView Info = [com.google.android.webview | 792219903]: Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/151.0.7922.199 Mobile Safari/537.36
ACRA UUID = 3658e034-1da9-4757-8dd1-448c74520c3b
FSRS = 5.1.0 (Enabled: true)
Crash Reports Enabled = true
```
### (Optional) Anything else you want to share?
Absolutely no idea how I ended up with NBSP inside my search string but since there is no history for past search query and it is a pain to type the selection query by hand I typically type it once and paste it in a note taking app for later. Likely appeared there.
### Research
- [x] I have checked the [manual](https://docs.ankidroid.org/) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://docs.ankidroid.org/manual.html#betaTesting))
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.