|
|
|
|
|
by lelandfe
1730 days ago
|
|
The next paragraph might be that clarification, although I agree it isn't totally clear what he meant there: > Assume that this regex will be used for a public URL shortener written in PHP, so URLs like http://localhost/, //foo.bar/, ://foo.bar/, data:text/plain;charset=utf-8,OHAI and tel:+1234567890 shouldn’t pass (even though they’re technically valid). Also, in this case I only want to allow the HTTP, HTTPS and FTP protocols. |
|