A bogus edge case in Perl regular expressions (PCRE) allows to inject newline characters at various places. This is a documented feature of PCRE, see http://www.regular-expressions.info/anchors.html#realend. So yes, this is a feature in Perl, but a bug in #Wikidata that already made it into our database dumps.
Patches for review:
* [x] https://github.com/DataValues/Number/pull/58
* [x] https://github.com/DataValues/Validators/pull/14
* [ ] https://github.com/DataValues/Time/pull/116
* [x] https://github.com/DataValues/Number/pull/59
* [x] https://github.com/DataValues/Geo/pull/64
* [x] https://github.com/DataValues/Common/pull/49
* [x] https://gerrit.wikimedia.org/r/284724
* [x] https://github.com/wmde/WikibaseDataModel/pull/662
* [ ] https://github.com/wmde/WikibaseDataModelServices/pull/132
* [ ] https://gerrit.wikimedia.org/r/284729
* [ ] https://github.com/DataValues/Number/pull/60
* [ ] … more?