not sure how careful we should be about performance issues. I avoided regexes, but still used startswith which is not the fastest way to check apparently, but the difference doesn't look too big.
We could be a more precise by validating the whole format (a comma should be present after the data: and there should be some alphanumerical characters)
not sure how careful we should be about performance issues. I avoided regexes, but still used
startswith
which is not the fastest way to check apparently, but the difference doesn't look too big.We could be a more precise by validating the whole format (a comma should be present after the
data:
and there should be some alphanumerical characters)