Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset=utf-8>
<title>valid src</title>
<script src="a:foo.com"></script><!-- scheme-private -->
<script src="foo:/"></script><!-- scheme-private-slash -->
<script src="foo://"></script><!-- scheme-private-slash-slash -->
<script src="foo:/bar.com/"></script><!-- scheme-private-path -->
<script src="c:/foo"></script><!-- scheme-private-single-letter -->
<script src="madeupscheme:/example.com/"></script><!-- scheme-private-single-slash -->
<script src="file:/example.com/"></script><!-- scheme-file-single-slash -->
<script src="ftps:/example.com/"></script><!-- scheme-ftps-single-slash -->
<script src="gopher:/example.com/"></script><!-- scheme-gopher-single-slash -->
<script src="ws:/example.com/"></script><!-- scheme-ws-single-slash -->
<script src="wss:/example.com/"></script><!-- scheme-wss-single-slash -->
<script src="javascript:/example.com/"></script><!-- scheme-javascript-single-slash -->
<script src="mailto:/example.com/"></script><!-- scheme-mailto-single-slash -->
<script src="madeupscheme:example.com/"></script><!-- scheme-private-no-slash -->
<script src="ftps:example.com/"></script><!-- scheme-ftps-no-slash -->
<script src="gopher:example.com/"></script><!-- scheme-gopher-no-slash -->
<script src="wss:example.com/"></script><!-- scheme-wss-no-slash -->
<script src="mailto:example.com/"></script><!-- scheme-mailto-no-slash -->
<script src="data:text/plain,foo"></script><!-- scheme-data-no-slash -->
<script src="http💩//:foo"></script><!-- path-contains-pile-of-poo -->
<script src="http://%25DOMAIN:foobar@foodomain.com"></script><!-- userinfo-username-contains-percent-encoded -->
<script src="//foo/bar"></script><!-- scheme-schemeless-relative -->
<script src="/"></script><!-- path-slash-only-relative -->
<script src="/a/b/c"></script><!-- path-simple-relative -->
<script src="/a%2fc"></script><!-- path-percent-encoded-slash-relative -->
<script src="/a/%2f/c"></script><!-- path-percent-encoded-slash-plus-slashes-relative -->
<script src="?"></script><!-- query-empty-no-path-relative -->
<script src="#"></script><!-- fragment-empty-hash-only-no-path-relative -->
<script src="#/"></script><!-- fragment-slash-relative -->
<script src="#;?"></script><!-- fragment-semicolon-question-mark-relative -->
<script src="#β"></script><!-- fragment-non-ascii-relative -->
<script src="foo.com"></script><!-- scheme-none-relative -->
<script src=":"></script><!-- path-colon-relative -->
<script src=":a"></script><!-- path-leading-colon-letter-relative -->
<script src=":foo.com"></script><!-- path-leading-colon-chars-relative -->
<script src=":/"></script><!-- path-leading-colon-slash-relative -->
<script src=":#"></script><!-- path-leading-colon-hash-relative -->
<script src=":23"></script><!-- path-leading-colon-number-relative -->
<script src="/:23"></script><!-- path-slash-colon-number-relative -->
<script src="::"></script><!-- path-leading-colon-colon-relative -->
<script src="::23"></script><!-- path-colon-colon-number-relative -->
<script src="/💩"></script><!-- path-slash-pile-of-poo -->
<script src="file:"></script><!-- scheme-file-scheme-only -->
<script src="file:/"></script><!-- scheme-file-slash-only -->
<script src="file://"></script><!-- scheme-file-slash-slash-only -->
<script src="file:test"></script><!-- scheme-file-no-slash -->