Open
Description
Package version eg. v8, v9:
master
Code sample, to showcase or reproduce:
fmt.Println(dataURIRegex.MatchString(`data:,ohai`)
Prints false
it should print true
.
This is an inherited problem from every other validation library out there. This same regex keeps getting copied around.
Wikipedia gives a pretty clear guidance about what a valid Data URI is: data:[<media type>][;base64],<data>
note the optional state of <media type>
and even of the ;base64
element, and the requirement of a comma.