{"action":"created","issue":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1479","labels_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1479/labels{/name}","comments_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1479/comments","events_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1479/events","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1479","id":113776192,"number":1479,"title":"Sanitizer URL unexpected result","user":{"login":"FerdiAgrio","id":15358738,"avatar_url":"https://avatars.githubusercontent.com/u/15358738?v=3","gravatar_id":"","url":"https://api.github.com/users/FerdiAgrio","html_url":"https://github.com/FerdiAgrio","followers_url":"https://api.github.com/users/FerdiAgrio/followers","following_url":"https://api.github.com/users/FerdiAgrio/following{/other_user}","gists_url":"https://api.github.com/users/FerdiAgrio/gists{/gist_id}","starred_url":"https://api.github.com/users/FerdiAgrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FerdiAgrio/subscriptions","organizations_url":"https://api.github.com/users/FerdiAgrio/orgs","repos_url":"https://api.github.com/users/FerdiAgrio/repos","events_url":"https://api.github.com/users/FerdiAgrio/events{/privacy}","received_events_url":"https://api.github.com/users/FerdiAgrio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-28T09:23:48Z","updated_at":"2015-10-29T09:43:45Z","closed_at":null,"body":"When using the sanitizer API function I expect the string \"http://\" to result in an empty string since it's not a valid URL. Strangely though I get the same input back as being a valid URL, as in following example;\r\n\r\nvar_dump(wire('sanitizer')->url(\"http://\"));\r\nstring 'http://' (length=7)\r\n\r\nvar_dump(filter_var('http://', FILTER_VALIDATE_URL));\r\nboolean false\r\n\r\n\r\nhttps://processwire.com/talk/topic/11309-sanitizer-url-validation/\r\n\r\nThanks in advance!"},"comment":{"url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/comments/152129419","html_url":"https://github.com/ryancramerdesign/ProcessWire/issues/1479#issuecomment-152129419","issue_url":"https://api.github.com/repos/ryancramerdesign/ProcessWire/issues/1479","id":152129419,"user":{"login":"ryancramerdesign","id":328272,"avatar_url":"https://avatars.githubusercontent.com/u/328272?v=3","gravatar_id":"","url":"https://api.github.com/users/ryancramerdesign","html_url":"https://github.com/ryancramerdesign","followers_url":"https://api.github.com/users/ryancramerdesign/followers","following_url":"https://api.github.com/users/ryancramerdesign/following{/other_user}","gists_url":"https://api.github.com/users/ryancramerdesign/gists{/gist_id}","starred_url":"https://api.github.com/users/ryancramerdesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryancramerdesign/subscriptions","organizations_url":"https://api.github.com/users/ryancramerdesign/orgs","repos_url":"https://api.github.com/users/ryancramerdesign/repos","events_url":"https://api.github.com/users/ryancramerdesign/events{/privacy}","received_events_url":"https://api.github.com/users/ryancramerdesign/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T09:43:45Z","updated_at":"2015-10-29T09:43:45Z","body":"Thanks @FerdiAgrio , I've pushed a fix. "}}