-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
improve logo escaping #3511
improve logo escaping #3511
Conversation
@@ -1,5 +1,6 @@ | |||
'use strict' | |||
|
|||
const Joi = require('joi') |
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.
This will want updating to const Joi = require('@hapi/joi')
in the context of #3505 I'll sort it out in one or the other depending on which order these get merged in.
@@ -31,7 +32,12 @@ function prependPrefix(s, prefix) { | |||
} | |||
|
|||
function isDataUrl(s) { | |||
return s !== undefined && /^(data:)([^;]+);([^,]+),(.+)$/.test(s) | |||
try { | |||
Joi.assert(s, Joi.string().dataUri()) |
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.
Turns out we don't need wheel 2.0 here :) https://github.com/hapijs/joi/blob/master/API.md#stringdataurioptions
|
Cheers, thanks for picking this up! |
@chris48s thank you! |
Also prepares a 2.2.1 release for NPM