Check for input type and string length before sanitizing a URL
This commit is contained in:
@@ -723,6 +723,10 @@ export const shallowEqualKeys = (a,b, keys) => {
|
||||
}
|
||||
|
||||
export function sanitizeUrl(url) {
|
||||
if(typeof url !== "string" || url === "") {
|
||||
return ""
|
||||
}
|
||||
|
||||
return braintreeSanitizeUrl(url)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user