(1) False negatives in regex (with "_")
**Problem:**
We allow underscores in the input for properties of datatype Commons media but then a constraint violation is triggered after saving if underscores are used.
**Example:**
If an image name (e.g. P18, P1442) does contain underscores '_', wikidata considers this to be ill-formed. Now
* "Grab fritz jellinek wiener zentralfriedhof 2020-01-30(2).jpg" shows no warning (see https://www.wikidata.org/wiki/Q59601709)
* "Grab_fritz_jellinek_wiener_zentralfriedhof_2020-01-30(2).jpg" shows constraint violation {F34519253}
**Acceptance criteria:**
*
**Open questions:**
* I don't understand why underscores are a problem here at all... (they should be included in regex ".+")
* Standard Mediawiki-normalization would worsen the original problem, right?
(2) Standard Mediawiki-normalization for pagenames/filenames in Wikidata
**Problem:**
Currently we do not normalize file names. To be consistent with Mediawiki we want to automatically replace underscores with spaces on save.
**Example:**
Currently we don't normalize the file name ("_" not removed on save)
* https://test.wikidata.org/w/index.php?title=Q212413&diff=prev&oldid=529671
We do already normalize sitelinks ("_" removed on save)
* https://test.wikidata.org/w/index.php?title=Q212413&diff=next&oldid=529671 (edit included an underscore)
**Acceptance criteria:**
* for new edits, pagenames/filenames are normalized before storing them in the DB ("file name.jpg" -> "file_name.jpg")
* for visual presentation in the UI pagenames/filenames are normalized in the opposite way ("file_name.jpg" -> "file name.jpg")
**Open questions:**
* Is this really how we are doing it in Mediawiki? (this seems weird.. xD)
* Is there any case where this would not be a good idea?
(3)
**Original:**
If an image name (e.g. P18, P1442) does contain underscores '_', wikidata considers this to be ill-formed. Now
* Grab fritz jellinek wiener zentralfriedhof 2020-01-30(2).jpg and
* Grab_fritz_jellinek_wiener_zentralfriedhof_2020-01-30(2).jpg are identical by definition and the warning is an annoyance
So please can you silently do all the necessary underscore <-> space replacements by the underlying software instead of propagating it to the users.