Fix media viewer for images with unicode characters

Also address FIXMEs related to History.js which we no longer use.

Bug: 57089
Change-Id: I8c8beb79b57d2a14b59fbc695df3262eee53ed59
Merge "Fix media viewer for images with unicode characters"