Closed Drahflow closed 3 years ago
It's not the input field that doesn't accept that but the OSM API.
You can report bugs for the OSM website here: https://github.com/openstreetmap/openstreetmap-website
Also, you should maybe report the bug to the keyboard software (if it is open source), a keyboard shouldn't add characters you didn't type. Who knows what else it does.
IMHO, the OSM API is entirely right in rejecting this character, it has no business being in a human readable field (and will wreak havoc in many places). But if so, Streetcomplete should not have sent this character to the API. The best moment to give user feedback would probably have been the moment the note has been submitted ("Sorry, your input contains invalid characters.")
In case you decide to implement input filtering, this file seems relevant: https://github.com/openstreetmap/openstreetmap-website/blob/70d7d8d850148f714b70a3297c02a8203214dec6/app/validators/characters_validator.rb
IMO this is a case for reporting this bug to the keyboard software. I don't want to filter the input on potentially any input field.
Imagine you'd have a hardware keyboard that would randomly add invisible control characters - that would go right into the trash.
Imagine you'd have a hardware keyboard that would randomly add invisible control characters - that would go right into the trash.
Depending on how poor you are and how easily is new keyboard obtainable, though :smile: Anyway, it might not be a random bug in keyboard software but actually a feature of the keyboard which user inadvertently activated...
Personally, I wouldn't bother with investigation and bug reporting if that is default manufacturer keyboard (as I dislike spending my time to help improve non-free software)
In such case I'd just install some different keyboard software from f-droid.org (which I always do anyway, as I find stock keyboards so full of unwanted features while still failing to provide essential things I want). If one does not want any bells & whistles, I find Simple Keyboard
refreshingly simple. Or, if one sometimes needs option to have full desktop keyboard available on mobile (like for remote ssh sessions), Hacker's keyboard
is good choice for me (although that one also allows to you to send control characters if you enable layout with ctrl
key, so beware).
When trying to upload my answers, I currently see "Error while uploading answers", due to (note the zero byte in the note comment):
How to Reproduce
Somehow convince the note input field to accept a zero byte (honestly no idea how my android keyboard got the idea to do that).
Versions affected
StreetComplete: v33.2 Android: 9, but this seems irrelevant.