A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
URL: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 44: | Line 44: | ||
* https://github.com/joyent/node/blob/master/doc/api/url.markdown | * https://github.com/joyent/node/blob/master/doc/api/url.markdown | ||
* https://github.com/bestiejs/punycode.js (just Punycode) | * https://github.com/bestiejs/punycode.js (just Punycode) | ||
==Schemes== | |||
Currently the parser does not separate out query, this could be problematic for about and maybe mailto. | |||
* data | |||
* javascript | |||
* mailto | |||
* about (uselessly defined in RFC 6694) | |||
[[Category:Spec coordination]] | [[Category:Spec coordination]] |
Revision as of 10:43, 4 November 2012
This documents research and notes around URLs for the URL standard.
Implementations
- http://trac.webkit.org/browser/trunk/Source/WebCore/platform/KURL.cpp
- http://trac.webkit.org/browser/trunk/Source/WebCore/platform/KURLWTFURL.cpp
- http://trac.webkit.org/browser/trunk/Source/WebCore/platform/KURLGoogle.cpp
- http://trac.webkit.org/browser/trunk/Source/WebCore/platform/network/DataURL.cpp (data URLs)
- http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsStandardURL.cpp
- http://mxr.mozilla.org/mozilla-central/source/dom/src/jsurl/nsJSProtocolHandler.cpp (javascript URLs)
- http://mxr.mozilla.org/mozilla-central/source/nsprpub/pr/src/misc/prnetdb.c#1544 (IPv6)
Tests
Variants of the following code (runs in Live DOM Viewer) are useful to test which code points are URL escaped in browsers:
<!DOCTYPE html> <script> var a = document.createElement("a") i = 0 cp = 0x100 while ( i < cp ) { a.href = "http://x" + String.fromCharCode(i) + "@x/" if(a.href.length != "http://x)@x/".length) { w(a.href) } i++ } </script>
Parsing
- https://github.com/annevk/url/blob/master/url.js
- http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Sep/0305.html has notes on file URLs in Gecko.
JavaScript libraries
For improving the API we might want to take inspiration from:
- http://medialize.github.com/URI.js/
- https://github.com/joyent/node/blob/master/doc/api/url.markdown
- https://github.com/bestiejs/punycode.js (just Punycode)
Schemes
Currently the parser does not separate out query, this could be problematic for about and maybe mailto.
- data
- javascript
- mailto
- about (uselessly defined in RFC 6694)