Show .reg files as plain text (BB-12736)

Issue #11222 resolved
Iain Elder created an issue

I have a .reg file (Windows Registry Entries) in a repo that stores application settings.

The containing folder lists the file called "default_settings.reg".

When I click the file name, I expect to see the content of the reg file presented as plain text, like a .txt file.

The current actual behaviour depends on the web browser.

Chrome renders the content of the file as part of the page, so the plain text formatting is lost. All lines run together. This is inconvenient, because the file is unreadable.

Internet Explorer prompts me to download or run the file. This is dangerous, because it makes it easy to accidently apply the registry settings.

Could you update the source browser to present .reg files as plain text?

Comments (4)

  1. Jonathan Poh Account Deactivated

    Hi @Iain Elder , I cannot reproduce the view you're seeing in Chrome, so this may have already been fixed in the course of other work we've done in the past few months.

    However, instead of displaying the contents of the .reg file as plain text, we always treat as a binary file (.reg files can be either text or binary, and text .reg files can also contain potentially unsafe binary data).

    As with all unknown binary file types (e.g. not a common image type) we just show a 'View raw' link which lets you download the file and open it in the appropriate application (which in this case, is the Windows Registry Editor, and it's up to the end user to take the necessary precautions to 'save' rather than 'run' the file on completion of the download.

  2. Log in to comment