-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(isDataURI): fix dataURI mediaType format #1916
fix(isDataURI): fix dataURI mediaType format #1916
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1916 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2072 2072
Branches 472 472
=========================================
Hits 2072 2072
Continue to review full report at Codecov.
|
test/validators.js
Outdated
@@ -10151,6 +10151,7 @@ describe('Validators', () => { | |||
' data:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E', | |||
'data:,A%20brief%20note', | |||
'data:text/html;charset=US-ASCII,%3Ch1%3EHello!%3C%2Fh1%3E', | |||
'data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,dGVzdC5kb2N4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comma to the end of the line here and then tests should pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contrib 🎉
// And sorry for the delay in reviewing this.
fix(isDataURI): fix dataURI mediaType format
The readAsDataURL method MDN generates a dot mediaType for some file formats (.docx - application/vnd.openxmlformats-officedocument.wordprocessingml.document, . xlsx - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet).
I extended the mediaType validation pattern to be compatible with readAsDataURL.
Checklist