README rendering should only apply to text documents
GitLab will typically show the contents of a README file if it finds one in a given repo. The problem is that it shows the contents of any file, even if it's a binary file. For example, if an image file in the repo is named
README.png, the contents of that image file are rendered when the README tab is clicked. I've also seen this occur with Microsoft Word documents (README.doc or README.docx).
Ideally, README files should only be rendered if they are plain-text files (not binary files). Perhaps a white-list of approved file extensions is the solution (e.g. README, README.txt, README.md, etc)?
Here's a screenshot of the issue in 7.9.1: