fix(isDataURI): Fix MIME Types with underscores not getting matched by pano9000 · Pull Request #2122 · validatorjs/validator.js
Fix isDataURI returning false for perfectly valid strings, more info can be found here: #2121
I've added an additional test case with a MIME type that has an underscore in its name and added the _ (underscore) to the RegExp to match for these cases.
This fixes #2121
(on a side note here: I feel like isDataURI could or maybe even should be rewritten to internally use isMimeType and isBase64 -> that way you would get rid of some code duplication - but that is a completely different topic than this quick bug fix).
Checklist
- PR contains only changes related; no stray files, etc.
[ ] README updated (where applicable)- Tests written (where applicable)