mirror of
https://github.com/github/codeql.git
synced 2026-08-04 17:33:18 +02:00
12 lines
201 B
Go
12 lines
201 B
Go
package main
|
|
|
|
import "net/url"
|
|
|
|
func sanitizeUrl(urlstr string) string {
|
|
u, err := url.Parse(urlstr)
|
|
if err != nil || u.Scheme == "javascript" { // $ Alert
|
|
return "about:blank"
|
|
}
|
|
return urlstr
|
|
}
|