I don't know the exact location, but it is probably somewhere in the webview tree, since it affects apps that embed webviews as well:
https://android.googlesource.com/platform/frameworks/base/+/...
https://android.googlesource.com/platform/frameworks/base/+/...
Especially with a method called "public static class IllegalCharacterValueSanitizer".