Skip to content

Commit

Permalink
allow empty scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Jun 2, 2016
1 parent 1a260a4 commit b833428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleaner.go
Expand Up @@ -162,7 +162,7 @@ func cleanNode(c *Config, n *html.Node) *html.Node {
if !c.AllowJavascriptURL && (aatom == atom.Href || aatom == atom.Src || aatom == atom.Poster) {
if u, err := url.Parse(a.Val); err != nil {
continue
} else if u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "mailto" && u.Scheme != "data" {
} else if u.Scheme != "http" && u.Scheme != "https" && u.Scheme != "mailto" && u.Scheme != "data" && u.Scheme != "" {
continue
} else if c.ValidateURL != nil && !c.ValidateURL(u) {
continue
Expand Down

0 comments on commit b833428

Please sign in to comment.