Filer detects the wrong mime-type on html embedded scripts
Affected version
- Nightly flatpak: Yes
Steps to reproduce
- Right click on a script file on say GitLab or GitHub and select "save as" so the html page of the script is saved instead of the actual script.
Current behavior
The displayed icon is that for a shell script and the mime type in properties is "application/x-shellscript"
Expected behavior
The icon for html should be used and the mime type "text/html" should be shown in properties
Additional information
The "file" utility shows the correct type of the file so Nautilus/Filer should be able to do the same:
henrik@Sineya:~/Skrivbord$ file install.sh install.sh: HTML document, UTF-8 Unicode text, with very long lines
Looks like Filer goes by the file extension here which smells insecure Windows type behaviour. And since this is common behaviour among new users not familiar with how GitHub/GitLab works they get confused on why the script does not run so if the proper html icon was shown instead that should perhaps make some people realize their mistake.