BUG: 364884
Only match real MIME types when doing string matching to prevent pulling in unrelated files whose types match the string.
This prevents weird situations such as ISO files (which show up as "raw CD image") appearing in image searches.
nicolasfella | |
dfaure | |
kossebau | |
vhanda |
Frameworks |
BUG: 364884
Only match real MIME types when doing string matching to prevent pulling in unrelated files whose types match the string.
This prevents weird situations such as ISO files (which show up as "raw CD image") appearing in image searches.
No Linters Available |
No Unit Test Coverage |
Yes, but then startsWith() would be even more correct (and slightly faster) than contains().
And application/vnd.oasis.opendocument.text isn't plain text, so contains("text") should also be changed to startsWith("text/").
Use startsWith() instead of contains() for greater speed and correctness, and do this for text MIME types as well
Yes (although I would then swap document to be after text/, to have all the "groups" together, and then the "substring searches").
In any case feel free to push.