misidentifies .html file as Perl script when it contains JavaScript "use strict"
Bug #1890716 reported by
Alex A. D.
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
shared-mime-info |
Fix Released
|
Unknown
|
|||
qtbase-opensource-src (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
shared-mime-info (Debian) |
Confirmed
|
Unknown
|
|||
shared-mime-info (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
For .html files `xdg-mime` reports wrong type. The culprit is the `"use strict"` phrase which is used in JavaScript. It should not mistake .html files for anything else except of text/html !
STEPS TO REPRODUCE:
Run the following step by step in any folder:
1. $ echo "\"use strict\"" > index.html
2. $ xdg-mime query filetype index.html # -> application/x-perl - this should be text/html!
Platform:
Ubuntu 20.04.1 LTS (Focal Fossa)"
Linux version 5.4.0-42-generic (buildd@
xdg-utils: 1.1.3-2ubuntu1
description: | updated |
tags: | added: html xdg-mime xdg-open |
tags: | added: 20.04 kde kubuntu perl |
Changed in shared-mime-info (Ubuntu): | |
status: | Invalid → New |
summary: |
- kmimetypefinder5 *.html reports wrong type + misidentifies .html file as Perl script when it contains JavaScript "use + strict" |
Changed in shared-mime-info (Ubuntu): | |
status: | New → Invalid |
Changed in shared-mime-info (Debian): | |
status: | Unknown → Confirmed |
affects: | kde-cli-tools (Ubuntu) → qtbase-opensource-src (Ubuntu) |
Changed in shared-mime-info: | |
status: | Unknown → Fix Released |
To post a comment you must log in.
Thank you for your bug report, the file types are determined from the content and not only the name. An html is supposed to start with <html>