epuber 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/README.md +3 -11
- data/bin/epuber +2 -3
- data/epuber.gemspec +3 -6
- data/lib/epuber/book/contributor.rb +1 -1
- data/lib/epuber/book/file_request.rb +1 -1
- data/lib/epuber/book/target.rb +1 -2
- data/lib/epuber/book/toc_item.rb +1 -2
- data/lib/epuber/book.rb +1 -2
- data/lib/epuber/checker/text_checker.rb +1 -1
- data/lib/epuber/checker.rb +1 -2
- data/lib/epuber/checker_transformer_base.rb +1 -0
- data/lib/epuber/command/build.rb +1 -2
- data/lib/epuber/command/compile.rb +1 -1
- data/lib/epuber/command/init.rb +1 -2
- data/lib/epuber/command/server.rb +1 -2
- data/lib/epuber/command.rb +1 -1
- data/lib/epuber/compiler/compilation_context.rb +1 -1
- data/lib/epuber/compiler/file_database.rb +3 -5
- data/lib/epuber/compiler/file_finders/abstract.rb +1 -1
- data/lib/epuber/compiler/file_finders/imaginary.rb +1 -2
- data/lib/epuber/compiler/file_finders/normal.rb +1 -1
- data/lib/epuber/compiler/file_resolver.rb +1 -1
- data/lib/epuber/compiler/file_stat.rb +0 -1
- data/lib/epuber/compiler/file_types/abstract_file.rb +1 -2
- data/lib/epuber/compiler/file_types/bade_file.rb +1 -2
- data/lib/epuber/compiler/file_types/coffee_script_file.rb +1 -2
- data/lib/epuber/compiler/file_types/container_xml_file.rb +1 -2
- data/lib/epuber/compiler/file_types/generated_file.rb +1 -2
- data/lib/epuber/compiler/file_types/ibooks_display_options_file.rb +1 -7
- data/lib/epuber/compiler/file_types/image_file.rb +1 -2
- data/lib/epuber/compiler/file_types/mime_type_file.rb +1 -2
- data/lib/epuber/compiler/file_types/nav_file.rb +1 -2
- data/lib/epuber/compiler/file_types/opf_file.rb +1 -2
- data/lib/epuber/compiler/file_types/source_file.rb +1 -2
- data/lib/epuber/compiler/file_types/static_file.rb +1 -2
- data/lib/epuber/compiler/file_types/stylus_file.rb +1 -2
- data/lib/epuber/compiler/file_types/xhtml_file.rb +2 -4
- data/lib/epuber/compiler/generator.rb +1 -1
- data/lib/epuber/compiler/meta_inf_generator.rb +1 -1
- data/lib/epuber/compiler/nav_generator.rb +1 -1
- data/lib/epuber/compiler/opf_generator.rb +1 -1
- data/lib/epuber/compiler/problem.rb +1 -2
- data/lib/epuber/compiler/xhtml_processor.rb +3 -1
- data/lib/epuber/compiler.rb +7 -11
- data/lib/epuber/config.rb +1 -2
- data/lib/epuber/dsl/attribute.rb +1 -1
- data/lib/epuber/dsl/attribute_support.rb +2 -2
- data/lib/epuber/dsl/object.rb +1 -1
- data/lib/epuber/dsl/tree_object.rb +1 -1
- data/lib/epuber/helper.rb +1 -1
- data/lib/epuber/lockfile.rb +1 -1
- data/lib/epuber/plugin.rb +1 -1
- data/lib/epuber/ruby_extensions/match_data.rb +1 -0
- data/lib/epuber/ruby_extensions/thread.rb +1 -0
- data/lib/epuber/server/handlers.rb +1 -1
- data/lib/epuber/server.rb +2 -2
- data/lib/epuber/templates.rb +2 -1
- data/lib/epuber/third_party/bower/bower.json +3 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/bower.json +1 -1
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.js +2 -3
- data/lib/epuber/third_party/bower/bower_components/cookies-js/dist/cookies.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/AUTHORS.txt +278 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{MIT-LICENSE.txt → LICENSE.txt} +17 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/README.md +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/bower.json +2 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.js +2566 -1962
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/dist/jquery.min.map +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/LICENSE.txt +36 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/{src → external}/sizzle/dist/sizzle.js +236 -160
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/external/sizzle/dist/sizzle.min.map +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/jsonp.js +25 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/load.js +20 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseJSON.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/parseXML.js +4 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/script.js +16 -12
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/location.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/nonce.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/var/rquery.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax/xhr.js +73 -42
- data/lib/epuber/third_party/bower/bower_components/jquery/src/ajax.js +116 -57
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/attr.js +49 -48
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/classes.js +86 -67
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/prop.js +63 -32
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/support.js +6 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes/val.js +40 -24
- data/lib/epuber/third_party/bower/bower_components/jquery/src/attributes.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/callbacks.js +114 -87
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/access.js +11 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/init.js +27 -16
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/parseHTML.js +10 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/ready.js +20 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core/var/rsingleTag.js +4 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/core.js +77 -85
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/addGetHookIf.js +5 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/adjustCSS.js +65 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/curCSS.js +20 -17
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/defaultDisplay.js +16 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/hiddenVisibleSelectors.js +9 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/showHide.js +48 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/support.js +86 -61
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/cssExpand.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/getStyles.js +8 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/isHidden.js +6 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rmargin.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/var/rnumnonpx.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css/{swap.js → var/swap.js} +3 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/css.js +107 -55
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/Data.js +93 -74
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/{accepts.js → var/acceptData.js} +4 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_user.js → dataPriv.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data/var/{data_priv.js → dataUser.js} +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/data.js +49 -40
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deferred.js +34 -25
- data/lib/epuber/third_party/bower/bower_components/jquery/src/deprecated.js +27 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/dimensions.js +9 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/Tween.js +14 -7
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects/animatedSelector.js +4 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/effects.js +96 -115
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/ajax.js +11 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/alias.js +11 -23
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/focusin.js +53 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/support.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event/trigger.js +183 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/event.js +168 -325
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/amd.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/exports/global.js +2 -8
- data/lib/epuber/third_party/bower/bower_components/jquery/src/intro.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/jquery.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/_evalUrl.js +6 -4
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/buildFragment.js +102 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/getAll.js +21 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/setGlobalEval.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/support.js +7 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rcheckableType.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rscriptType.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/var/rtagName.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation/wrapMap.js +27 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/manipulation.js +206 -305
- data/lib/epuber/third_party/bower/bower_components/jquery/src/offset.js +40 -29
- data/lib/epuber/third_party/bower/bower_components/jquery/src/outro.js +1 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue/delay.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/jquery/src/queue.js +23 -22
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-native.js +107 -68
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector-sizzle.js +5 -5
- data/lib/epuber/third_party/bower/bower_components/jquery/src/selector.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/serialize.js +28 -14
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/findFilter.js +13 -13
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/dir.js +20 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/rneedsContext.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing/var/siblings.js +15 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/traversing.js +32 -56
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/arr.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/class2type.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/concat.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/document.js +3 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/documentElement.js +5 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/hasOwn.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/indexOf.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/pnum.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/push.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rcssNum.js +7 -0
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/rnotwhite.js +3 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/slice.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/support.js +3 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/toString.js +2 -2
- data/lib/epuber/third_party/bower/bower_components/jquery/src/wrap.js +19 -19
- data/lib/epuber/third_party/bower/bower_components/spin.js/{LICENSE.txt → LICENSE.md} +2 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/README.md +21 -21
- data/lib/epuber/third_party/bower/bower_components/spin.js/bower.json +0 -1
- data/lib/epuber/third_party/bower/bower_components/spin.js/jquery.spin.js +23 -24
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.js +153 -113
- data/lib/epuber/third_party/bower/bower_components/spin.js/spin.min.js +2 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/CHANGELOG.md +424 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/README.md +23 -308
- data/lib/epuber/third_party/bower/bower_components/uri.js/SECURITY.md +12 -0
- data/lib/epuber/third_party/bower/bower_components/uri.js/bower.json +2 -2
- data/lib/epuber/third_party/bower/bower_components/uri.js/contributing.md +0 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/IPv6.js +3 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/SecondLevelDomains.js +8 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentQuery.js +21 -4
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.fragmentURI.js +1 -1
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.js +312 -69
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URI.min.js +85 -77
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/URITemplate.js +28 -11
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.js +17 -18
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/jquery.URI.min.js +6 -6
- data/lib/epuber/third_party/bower/bower_components/uri.js/src/punycode.js +63 -38
- data/lib/epuber/third_party/bower.rb +2 -0
- data/lib/epuber/transformer/text_transformer.rb +1 -2
- data/lib/epuber/transformer.rb +1 -2
- data/lib/epuber/user_interface.rb +1 -1
- data/lib/epuber/vendor/hash_binding.rb +1 -1
- data/lib/epuber/vendor/nokogiri_extensions.rb +24 -21
- data/lib/epuber/vendor/ruby_templater.rb +1 -2
- data/lib/epuber/vendor/size.rb +1 -0
- data/lib/epuber/vendor/version.rb +1 -1
- data/lib/epuber/version.rb +2 -1
- data/lib/epuber.rb +1 -1
- metadata +48 -30
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.js +0 -3
- data/lib/epuber/third_party/bower/bower_components/jquery/src/sizzle/dist/sizzle.min.map +0 -1
- data/lib/epuber/third_party/bower/bower_components/jquery/src/var/strundefined.js +0 -3
- data/lib/epuber/vendor/globals_context.rb +0 -26
@@ -1,10 +1,20 @@
|
|
1
1
|
# URI.js #
|
2
2
|
|
3
|
+
[](https://cdnjs.com/libraries/URI.js)
|
3
4
|
* [About](http://medialize.github.io/URI.js/)
|
4
5
|
* [Understanding URIs](http://medialize.github.io/URI.js/about-uris.html)
|
5
6
|
* [Documentation](http://medialize.github.io/URI.js/docs.html)
|
6
7
|
* [jQuery URI Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html)
|
7
8
|
* [Author](http://rodneyrehm.de/en/)
|
9
|
+
* [Changelog](./CHANGELOG.md)
|
10
|
+
|
11
|
+
---
|
12
|
+
|
13
|
+
> **IMPORTANT:** You **may not need URI.js** anymore! Modern browsers provide the [URL](https://developer.mozilla.org/en-US/docs/Web/API/URL) and [URLSearchParams](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) interfaces.
|
14
|
+
|
15
|
+
---
|
16
|
+
|
17
|
+
> **NOTE:** The npm package name changed to `urijs`
|
8
18
|
|
9
19
|
---
|
10
20
|
|
@@ -17,9 +27,7 @@ var separator = url.indexOf('?') > -1 ? '&' : '?';
|
|
17
27
|
url += separator + encodeURIComponent("foo") + "=" + encodeURIComponent("bar");
|
18
28
|
```
|
19
29
|
|
20
|
-
|
21
|
-
|
22
|
-
How about a nice, clean and simple API for mutating URIs:
|
30
|
+
Things are looking up with [URL](https://developer.mozilla.org/en/docs/Web/API/URL) and the [URL spec](http://url.spec.whatwg.org/) but until we can safely rely on that API, have a look at URI.js for a clean and simple API for mutating URIs:
|
23
31
|
|
24
32
|
```javascript
|
25
33
|
var url = new URI("http://example.org/foo?bar=baz");
|
@@ -79,20 +87,14 @@ See the [About Page](http://medialize.github.io/URI.js/) and [API Docs](http://m
|
|
79
87
|
|
80
88
|
URI.js (without plugins) has a gzipped weight of about 7KB - if you include all extensions you end up at about 13KB. So unless you *need* second level domain support and use URI templates, we suggest you don't include them in your build. If you don't need a full featured URI mangler, it may be worth looking into the much smaller parser-only alternatives [listed below](#alternatives).
|
81
89
|
|
82
|
-
URI.js is available through [npm](
|
90
|
+
URI.js is available through [npm](https://www.npmjs.com/package/urijs), [bower](http://bower.io/search/?q=urijs), [bowercdn](http://bowercdn.net/package/urijs), [cdnjs](https://cdnjs.com/libraries/URI.js) and manually from the [build page](http://medialize.github.io/URI.js/build.html):
|
83
91
|
|
84
92
|
```bash
|
85
93
|
# using bower
|
86
94
|
bower install uri.js
|
87
95
|
|
88
|
-
# using Jam
|
89
|
-
jam install URIjs
|
90
|
-
|
91
96
|
# using npm
|
92
|
-
npm install
|
93
|
-
|
94
|
-
# using spm
|
95
|
-
spm install urijs
|
97
|
+
npm install urijs
|
96
98
|
```
|
97
99
|
|
98
100
|
### Browser ###
|
@@ -101,13 +103,13 @@ I guess you'll manage to use the [build tool](http://medialize.github.io/URI.js/
|
|
101
103
|
|
102
104
|
### Node.js and NPM ###
|
103
105
|
|
104
|
-
Install with `npm install
|
106
|
+
Install with `npm install urijs` or add `"urijs"` to the dependencies in your `package.json`.
|
105
107
|
|
106
108
|
```javascript
|
107
109
|
// load URI.js
|
108
|
-
var URI = require('
|
110
|
+
var URI = require('urijs');
|
109
111
|
// load an optional module (e.g. URITemplate)
|
110
|
-
var URITemplate = require('
|
112
|
+
var URITemplate = require('urijs/src/URITemplate');
|
111
113
|
|
112
114
|
URI("/foo/bar/baz.html")
|
113
115
|
.relativeTo("/foo/bar/sub/world.html")
|
@@ -116,19 +118,19 @@ URI("/foo/bar/baz.html")
|
|
116
118
|
|
117
119
|
### RequireJS ###
|
118
120
|
|
119
|
-
Clone the URI.js repository or use a package manager to get URI.js into your project.
|
121
|
+
Clone the URI.js repository or use a package manager to get URI.js into your project.
|
120
122
|
|
121
123
|
```javascript
|
122
124
|
require.config({
|
123
125
|
paths: {
|
124
|
-
|
126
|
+
urijs: 'where-you-put-uri.js/src'
|
125
127
|
}
|
126
128
|
});
|
127
129
|
|
128
|
-
require(['
|
130
|
+
require(['urijs/URI'], function(URI) {
|
129
131
|
console.log("URI.js and dependencies: ", URI("//amazon.co.uk").is('sld') ? 'loaded' : 'failed');
|
130
132
|
});
|
131
|
-
require(['
|
133
|
+
require(['urijs/URITemplate'], function(URITemplate) {
|
132
134
|
console.log("URITemplate.js and dependencies: ", URITemplate._cache ? 'loaded' : 'failed');
|
133
135
|
});
|
134
136
|
```
|
@@ -199,14 +201,14 @@ If you don't like URI.js, you may like one of the following libraries. (If yours
|
|
199
201
|
* [furl (Python)](https://github.com/gruns/furl)
|
200
202
|
* [mediawiki Uri](https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki/mediawiki.Uri.js?view=markup) (needs mw and jQuery)
|
201
203
|
* [jurlp](https://github.com/tombonner/jurlp)
|
202
|
-
* [jsUri](
|
204
|
+
* [jsUri](https://github.com/derek-watson/jsUri)
|
203
205
|
|
204
206
|
#### URL Parsers ####
|
205
207
|
|
206
208
|
* [The simple <a> URL Mutation "Hack"](http://jsfiddle.net/rodneyrehm/KkGUJ/) ([jsPerf comparison](http://jsperf.com/idl-attributes-vs-uri-js))
|
207
209
|
* [URI Parser](http://blog.stevenlevithan.com/archives/parseuri)
|
208
210
|
* [jQuery-URL-Parser](https://github.com/allmarkedup/jQuery-URL-Parser)
|
209
|
-
* [Google Closure Uri](
|
211
|
+
* [Google Closure Uri](https://google.github.io/closure-library/api/class_goog_Uri.html)
|
210
212
|
* [URI.js by Gary Court](https://github.com/garycourt/uri-js)
|
211
213
|
|
212
214
|
#### URI Template ####
|
@@ -244,291 +246,4 @@ URI.js is published under the [MIT license](http://www.opensource.org/licenses/m
|
|
244
246
|
|
245
247
|
## Changelog ##
|
246
248
|
|
247
|
-
|
248
|
-
|
249
|
-
* fixing [`URI.parseQuery()`](http://medialize.github.io/URI.js/docs.html#static-parseQuery) to accept `?foo&foo=bar` - [Issue #220](https://github.com/medialize/URI.js/issues/220)
|
250
|
-
* fixing [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to encode (instead of decode) array input - [Issue #223](https://github.com/medialize/URI.js/issues/223)
|
251
|
-
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/foo/..` to `/` - [Issue #224](https://github.com/medialize/URI.js/issues/224)
|
252
|
-
* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) to resolve `/foo/` and `/foo/bar` to `./` instead of empty string - [Issue #226](https://github.com/medialize/URI.js/issues/226)
|
253
|
-
* fixing `bower.json`'s `"main": "src/URI.js"` - [Issue #227](https://github.com/medialize/URI.js/issues/227)
|
254
|
-
|
255
|
-
### 1.15.1 (April 5th 2015) ###
|
256
|
-
|
257
|
-
* fixing `URI()` to match behavior of `new URI()` (caused by [#196](https://github.com/medialize/URI.js/issues/196)) - [Issue #205](https://github.com/medialize/URI.js/issues/205)
|
258
|
-
* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to accept RegExp for name and value arguments - ([Issue #204](https://github.com/medialize/URI.js/issues/204), [peterwillis](https://github.com/peterwillis))
|
259
|
-
|
260
|
-
### 1.15.0 (April 1st 2015 - no joke, promise!) ###
|
261
|
-
|
262
|
-
* fixing `URI(undefined)` to throw TypeError - ([Issue #189](https://github.com/medialize/URI.js/issues/189), [Issue #196](https://github.com/medialize/URI.js/issues/196), [eakron](https://github.com/eakron)) - *tiny backward-compatibility-break*
|
263
|
-
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) - ([Issue #200](https://github.com/medialize/URI.js/issues/200), [giltayar](https://github.com/giltayar))
|
264
|
-
* fixing [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to properly en/decode URN paths - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
|
265
|
-
* fixing URI normalization to properly handle URN paths based on [RFC 2141](https://www.ietf.org/rfc/rfc2141.txt) syntax - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster))
|
266
|
-
* fixing [`.normalize()`](http://medialize.github.io/URI.js/docs.html#normalize) and [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly normalize URN paths
|
267
|
-
* adding `URI.encodeUrnPathSegment()`
|
268
|
-
* adding `URI.decodeUrnPathSegment()`
|
269
|
-
* adding `URI.decodeUrnPath()`
|
270
|
-
* adding `URI.recodeUrnPath()`
|
271
|
-
|
272
|
-
### 1.14.2 (February 25th 2015) ###
|
273
|
-
|
274
|
-
* fixing inclusion of LICENSE in packages - ([Issue #174](https://github.com/medialize/URI.js/issues/174))
|
275
|
-
* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to not interpret colon in path as IPv6 hostname - ([Issue #190](https://github.com/medialize/URI.js/issues/190))
|
276
|
-
* adding meta data for [SPM](http://www.spmjs.io/) package manager - ([Issue #176](https://github.com/medialize/URI.js/issues/176))
|
277
|
-
* adding license meta to `bower.json`
|
278
|
-
|
279
|
-
### 1.14.1 (October 1st 2014) ###
|
280
|
-
|
281
|
-
* fixing handling of String instances (not string primitives) - ([Issue #146](https://github.com/medialize/URI.js/issues/146))
|
282
|
-
* fixing Firefox [`.watch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch) interfering with `.parseQuery()` - ([Issue #169](https://github.com/medialize/URI.js/issues/169))
|
283
|
-
* fixing [`addQuery()`](http://medialize.github.io/URI.js/docs.html#search-add) to not throw error on null value - ([Issue #171](https://github.com/medialize/URI.js/issues/171))
|
284
|
-
|
285
|
-
### 1.14.0 (September 8th 2014) ###
|
286
|
-
|
287
|
-
* adding Hungarian second level domains - ([Issue #159](https://github.com/medialize/URI.js/issues/159))
|
288
|
-
* adding `<audio src="…">` and `<video src="…">` to supported DOM attributes - ([Issue #160](https://github.com/medialize/URI.js/issues/160)), ([Issue #161](https://github.com/medialize/URI.js/issues/161))
|
289
|
-
* fixing `file://hostname/path` parsing - ([Issue #158](https://github.com/medialize/URI.js/issues/158))
|
290
|
-
* fixing `.decodePathSegment()` to not throw malformed URI error - ([Issue #163](https://github.com/medialize/URI.js/issues/163))
|
291
|
-
|
292
|
-
### 1.13.2 (May 29th 2014) ###
|
293
|
-
|
294
|
-
* changes to package management manifests only
|
295
|
-
|
296
|
-
### 1.13.1 (April 16th 2014) ###
|
297
|
-
|
298
|
-
* fixing IPv6 normalization (bad variable name) - ([Issue #145](https://github.com/medialize/URI.js/issues/145))
|
299
|
-
* adding grunt and jshint
|
300
|
-
* changing code style to 2 spaces indentation, single quote strings
|
301
|
-
* applying `'use strict';` everywhere
|
302
|
-
* fixing jshint warnings
|
303
|
-
|
304
|
-
### 1.13.0 (April 15th 2014) ###
|
305
|
-
|
306
|
-
* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) and [`URI.buildHost()`](http://medialize.github.io/URI.js/docs.html#static-buildHost) to properly parse and build the IPv6 examples given in [RFC2732 Format for Literal IPv6 Addresses in URL's](http://tools.ietf.org/html/rfc2732#section-2) - ([Issue #144](https://github.com/medialize/URI.js/issues/144))
|
307
|
-
* adding performance improvements to SecondLevelDomain - ([PR #122](https://github.com/medialize/URI.js/pull/122), [gorhill](https://github.com/gorhill))
|
308
|
-
|
309
|
-
### 1.12.1 (March 8th 2014) ###
|
310
|
-
|
311
|
-
* fixing [`.encodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-encodeQuery) and [`.decodeQuery()`](http://medialize.github.io/URI.js/docs.html#static-decodeQuery) to respect [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) - ([Issue #137](https://github.com/medialize/URI.js/issues/137))
|
312
|
-
* fixing fragment plugins to return URI for simpler loading - ([Issue #139](https://github.com/medialize/URI.js/issues/139))
|
313
|
-
|
314
|
-
### 1.12.0 (January 23rd 2014) ###
|
315
|
-
|
316
|
-
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC3986 Reference Resolution Examples](http://tools.ietf.org/html/rfc3986#section-5.4) - ([Issue #113](https://github.com/medialize/URI.js/issues/113))
|
317
|
-
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to maintain leading parent references (`../`) for relative paths, while removing them for absolute paths - ([Issue #133](https://github.com/medialize/URI.js/issues/133))
|
318
|
-
* fixing `URI.protocol_expression` to properly accept `.` in compliance with [RFC 3986 - Scheme](http://tools.ietf.org/html/rfc3986#section-3.1) - ([Issue #132](https://github.com/medialize/URI.js/issues/132))
|
319
|
-
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to not use backtracking prone regular expression `URI.find_uri_expression` anymore - ([Issue #131](https://github.com/medialize/URI.js/issues/131))
|
320
|
-
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept options `ignore` and `ignoreHtml` to allow better control over which detected URLs get handled - ([Issue #117](https://github.com/medialize/URI.js/issues/117))
|
321
|
-
* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to accept option `start` to specify the RegExp used for finding the beginning of an URL (defaults to `/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi`) - ([Issue #115](https://github.com/medialize/URI.js/issues/115))
|
322
|
-
|
323
|
-
### 1.11.2 (August 14th 2013) ###
|
324
|
-
|
325
|
-
* fixing regression for Node.js introduced by `fixing unsafe eval by using UMD's root` - ([Issue #107](https://github.com/medialize/URI.js/issues/107))
|
326
|
-
* fixing parser to accept malformed userinfo (non-encoded email address) - ([Issue #108](https://github.com/medialize/URI.js/issues/108))
|
327
|
-
|
328
|
-
### 1.11.1 (August 13th 2013) ###
|
329
|
-
|
330
|
-
* fixing inconsistent [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results caused by inconsistent URI component handling - ([Issue #103](https://github.com/medialize/URI.js/issues/103))
|
331
|
-
* fixing unsafe eval by using UMD's root - ([Issue #105](https://github.com/medialize/URI.js/issues/105))
|
332
|
-
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - ([Issue #106](https://github.com/medialize/URI.js/issues/106))
|
333
|
-
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to collapse empty elements in array notation
|
334
|
-
|
335
|
-
### 1.11.0 (August 6th 2013) ###
|
336
|
-
|
337
|
-
* adding [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to provide en/decoding interface to `.segment()` - ([Issue #79](https://github.com/medialize/URI.js/issues/79))
|
338
|
-
* optimize [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) results - ([Issue #78](https://github.com/medialize/URI.js/issues/78), [Issue #95](https://github.com/medialize/URI.js/issues/95))
|
339
|
-
* removing obsolete code fragments from `URI.parse()` and `relativeTo()` - ([Issue #100](https://github.com/medialize/URI.js/issues/100))
|
340
|
-
* adding setting [`URI.escapeQuerySpace`](http://medialize.github.io/URI.js/docs.html#setting-escapeQuerySpace) to control if query string should escape spaces using `+` or `%20` - ([Issue #74](https://github.com/medialize/URI.js/issues/74))
|
341
|
-
* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.2.3
|
342
|
-
* fixing internal `strictEncodeURIComponent()` to work in Firefox 3.6 - ([Issue #91](https://github.com/medialize/URI.js/issues/91))
|
343
|
-
* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/.` and `/.//` to `/` - ([Issue #97](https://github.com/medialize/URI.js/issues/97))
|
344
|
-
* fixing [`.path()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to return empty string if there is no path - ([Issue #82](https://github.com/medialize/URI.js/issues/82))
|
345
|
-
* fixing crashing of `URI.decodeQuery()` on malformed input - now returns original undecoded data - ([Issue #87](https://github.com/medialize/URI.js/issues/87), [Issue #92](https://github.com/medialize/URI.js/issues/92))
|
346
|
-
* fixing build tool - ([Issue #83](https://github.com/medialize/URI.js/issues/83))
|
347
|
-
* fixing for-loop to make closure compiler happy - ([Issue #93](https://github.com/medialize/URI.js/issues/93))
|
348
|
-
* adding [`URI.noConflict()`](http://medialize.github.io/URI.js/docs.html#static-noConflict) - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
|
349
|
-
* fixing whitespace in code - ([Issue #84](https://github.com/medialize/URI.js/issue/84))
|
350
|
-
* fixing [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) to decode the hash value as well - ([Issue #90](https://github.com/medialize/URI.js/issue/90))
|
351
|
-
* prevent `jquery.URI.js` from temporarily using `window.location` as the `href` of an empty attribute of a DOM element - ([Issue #94](https://github.com/medialize/URI.js/issues/94))
|
352
|
-
* fixing internal `getType()` for IE8 with undefined value - ([Issue #96](https://github.com/medialize/URI.js/issues/96))
|
353
|
-
* adding DOM elements to [URI constructor](http://medialize.github.io/URI.js/docs.html#constructor) - ([Issue #77](https://github.com/medialize/URI.js/issues/77)):
|
354
|
-
* [`<a href="...">`](http://www.w3.org/html/wg/drafts/html/master/text-level-semantics.html#the-a-element)
|
355
|
-
* [`<blockquote cite="...">`](http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-blockquote-element)
|
356
|
-
* [`<link href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-link-element)
|
357
|
-
* [`<base href="...">`](http://www.w3.org/html/wg/drafts/html/master/document-metadata.html#the-base-element)
|
358
|
-
* [`<script src="...">`](http://www.w3.org/html/wg/drafts/html/master/scripting-1.html#script)
|
359
|
-
* [`<form action="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-form-element)
|
360
|
-
* [`<input type="image" src="...">`](http://www.w3.org/html/wg/drafts/html/master/forms.html#the-input-element)
|
361
|
-
* [`<img src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-img-element)
|
362
|
-
* [`<area href="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-area-element)
|
363
|
-
* [`<iframe src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-iframe-element)
|
364
|
-
* [`<embed src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-embed-element)
|
365
|
-
* [`<source src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-source-element)
|
366
|
-
* [`<track src="...">`](http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#the-track-element)
|
367
|
-
* optimize `jquery.URI.js` to use new DOM element infrastructure
|
368
|
-
|
369
|
-
### 1.10.2 (April 15th 2013) ###
|
370
|
-
|
371
|
-
* fixing [`relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) - ([Issue #75](https://github.com/medialize/URI.js/issues/75))
|
372
|
-
* fixing [`normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to not prepend `./` to relative paths - ([Issue #76](https://github.com/medialize/URI.js/issues/76))
|
373
|
-
|
374
|
-
### 1.10.1 (April 2nd 2013) ###
|
375
|
-
|
376
|
-
* adding [`absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative scheme - ([Issue #71](https://github.com/medialize/URI.js/issues/73))
|
377
|
-
|
378
|
-
### 1.10.0 (March 16th 2013) ###
|
379
|
-
|
380
|
-
* adding [`hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) - ([Issue #71](https://github.com/medialize/URI.js/issues/71))
|
381
|
-
* fixing URI property detection to return 'src' if none was detected (`jquery.URI.js`) - ([Issue #69](https://github.com/medialize/URI.js/issues/69))
|
382
|
-
|
383
|
-
### 1.9.1 (February 12th 2013) ###
|
384
|
-
|
385
|
-
* fixing IE9 compatibility with location import: `URI(location)`
|
386
|
-
* fixing string character access for IE7 - ([Issue #67](https://github.com/medialize/URI.js/issues/67)), ([Issue #68](https://github.com/medialize/URI.js/issues/68))
|
387
|
-
|
388
|
-
### 1.9.0 (February 11th 2013) ###
|
389
|
-
|
390
|
-
* adding [`.setQuery()`](http://medialize.github.io/URI.js/docs.html#search-set) - ([Issue #64](https://github.com/medialize/URI.js/issues/64))
|
391
|
-
* adding callback argument to [`.query()`](http://medialize.github.io/URI.js/docs.html#accessors-search)
|
392
|
-
* adding jQuery 1.9.1 to the test suite
|
393
|
-
|
394
|
-
### 1.8.3 (January 9th 2013) ###
|
395
|
-
|
396
|
-
* fixing [UglifyJS2](https://github.com/mishoo/UglifyJS2) compression - ([Issue #60](https://github.com/medialize/URI.js/issues/60), [fidian](https://github.com/fidian))
|
397
|
-
|
398
|
-
### 1.8.2 (December 27th 2012) ###
|
399
|
-
|
400
|
-
* adding `.fragmentPrefix()` to configure prefix of fragmentURI and fragmentQuery extensions - ([Issue #55](https://github.com/medialize/URI.js/issues/55))
|
401
|
-
* adding docs for [`.toString()`, `.valueOf()`](http://medialize.github.io/URI.js/docs.html#toString) and [`.href()`](http://medialize.github.io/URI.js/docs.html#href) - ([Issue #56](https://github.com/medialize/URI.js/issues/56))
|
402
|
-
* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) for descendants - ([Issue #57](https://github.com/medialize/URI.js/issues/57))
|
403
|
-
|
404
|
-
### 1.8.1 (November 15th 2012) ###
|
405
|
-
|
406
|
-
* fixing build() to properly omit empty query and fragment ([Issue #53](https://github.com/medialize/URI.js/issues/53))
|
407
|
-
|
408
|
-
### 1.8.0 (November 13th 2012) ###
|
409
|
-
|
410
|
-
* adding [`.resource()`](http://medialize.github.io/URI.js/docs.html#accessors-resource) as compound of [path, query, fragment]
|
411
|
-
* adding jQuery 1.8.x compatibility for jQuery.URI.js (remaining backwards compatibility!)
|
412
|
-
* adding default ports for gopher, ws, wss
|
413
|
-
* adding [`.duplicateQueryParameters()`](http://medialize.github.io/URI.js/docs.html#setting-duplicateQueryParameters) to control if `key=value` duplicates have to be preserved or reduced ([Issue #51](https://github.com/medialize/URI.js/issues/51))
|
414
|
-
* updating [Punycode.js](https://github.com/bestiejs/punycode.js/) to version 1.1.1
|
415
|
-
* improving AMD/Node using [UMD returnExports](https://github.com/umdjs/umd/blob/master/returnExports.js) - ([Issue #44](https://github.com/medialize/URI.js/issues/44), [Issue #47](https://github.com/medialize/URI.js/issues/47))
|
416
|
-
* fixing `.addQuery("empty")` to properly add `?empty` - ([Issue #46](https://github.com/medialize/URI.js/issues/46))
|
417
|
-
* fixing parsing of badly formatted userinfo `http://username:pass:word@hostname`
|
418
|
-
* fixing parsing of Windows-Drive-Letter paths `file://C:/WINDOWS/foo.txt`
|
419
|
-
* fixing `URI(location)` to properly parse the URL - ([Issue #52](https://github.com/medialize/URI.js/issues/52))
|
420
|
-
* fixing type error for fragment abuse demos - ([Issue #50](https://github.com/medialize/URI.js/issues/50))
|
421
|
-
* adding documentation for various [encode/decode functions](http://medialize.github.io/URI.js/docs.html#encoding-decoding)
|
422
|
-
* adding some pointers on possible problems with URLs to [About URIs](http://medialize.github.io/URI.js/about-uris.html)
|
423
|
-
* adding tests for fragment abuse and splitting tests into separate scopes
|
424
|
-
* adding meta-data for [Jam](http://jamjs.org/) and [Bower](http://twitter.github.com/bower/)
|
425
|
-
|
426
|
-
Note: QUnit seems to be having some difficulties on IE8. While the jQuery-plugin tests fail, the plugin itself works. We're still trying to figure out what's making QUnit "lose its config state".
|
427
|
-
|
428
|
-
### 1.7.4 (October 21st 2012) ###
|
429
|
-
|
430
|
-
* fixing parsing of `/wiki/Help:IPA` - ([Issue #49](https://github.com/medialize/URI.js/issues/49))
|
431
|
-
|
432
|
-
### 1.7.3 (October 11th 2012) ###
|
433
|
-
|
434
|
-
* fixing `strictEncodeURIComponent()` to properly encode `*` to `%2A`
|
435
|
-
* fixing IE9's incorrect report of `img.href` being available - ([Issue #48](https://github.com/medialize/URI.js/issues/48))
|
436
|
-
|
437
|
-
### 1.7.2 (August 28th 2012) ###
|
438
|
-
|
439
|
-
* fixing SLD detection in [`.tld()`](http://medialize.github.io/URI.js/docs.html#accessors-tld) - `foot.se` would detect `t.se` - ([Issue #42](https://github.com/medialize/URI.js/issues/42))
|
440
|
-
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to comply with [RFC 3986 Section 5.2.2](http://tools.ietf.org/html/rfc3986#section-5.2.2) - ([Issue #41](https://github.com/medialize/URI.js/issues/41))
|
441
|
-
* fixing `location` not being available in non-browser environments like node.js ([Issue #45](https://github.com/medialize/URI.js/issues/45) [grimen](https://github.com/grimen))
|
442
|
-
|
443
|
-
### 1.7.1 (August 14th 2012) ###
|
444
|
-
|
445
|
-
* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment)'s append operation - ([Issue #39](https://github.com/medialize/URI.js/issues/39))
|
446
|
-
|
447
|
-
### 1.7.0 (August 11th 2012) ###
|
448
|
-
|
449
|
-
* fixing URI() constructor passing of `base` - ([Issue #33](https://github.com/medialize/URI.js/issues/33) [LarryBattle](https://github.com/LarryBattle))
|
450
|
-
* adding [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) accessor - ([Issue #34](https://github.com/medialize/URI.js/issues/34))
|
451
|
-
* upgrading `URI.encode()` to strict URI encoding according to RFC3986
|
452
|
-
* adding `URI.encodeReserved()` to exclude reserved characters (according to RFC3986) from being encoded
|
453
|
-
* adding [URI Template (RFC 6570)](http://tools.ietf.org/html/rfc6570) support with [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html)
|
454
|
-
|
455
|
-
### 1.6.3 (June 24th 2012) ###
|
456
|
-
|
457
|
-
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
|
458
|
-
* adding [`.clone()`](http://medialize.github.io/URI.js/docs.html#clone) to copy an URI instance
|
459
|
-
|
460
|
-
### 1.6.2 (June 23rd 2012) ###
|
461
|
-
|
462
|
-
* [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory) now returns empty string if there is no directory
|
463
|
-
* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to join two relative paths properly - ([Issue #29](https://github.com/medialize/URI.js/issues/29))
|
464
|
-
|
465
|
-
### 1.6.1 (May 19th 2012) ###
|
466
|
-
|
467
|
-
* fixing TypeError on [`.domain()`](http://medialize.github.io/URI.js/docs.html#accessors-domain) with dot-less hostnames - ([Issue #27](https://github.com/medialize/URI.js/issues/27))
|
468
|
-
|
469
|
-
### 1.6.0 (March 19th 2012) ###
|
470
|
-
|
471
|
-
* adding [URN](http://tools.ietf.org/html/rfc3986#section-3) (`javascript:`, `mailto:`, ...) support
|
472
|
-
* adding [`.scheme()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol) as alias of [`.protocol()`](http://medialize.github.io/URI.js/docs.html#accessors-protocol)
|
473
|
-
* adding [`.userinfo()`](http://medialize.github.io/URI.js/docs.html#accessors-userinfo) to comply with terminology of [RFC 3986](http://tools.ietf.org/html/rfc3986#section-3.2.1)
|
474
|
-
* adding [jQuery Plugin](http://medialize.github.io/URI.js/jquery-uri-plugin.html) `src/jquery.URI.js`
|
475
|
-
* fixing relative scheme URLs - ([Issue #19](https://github.com/medialize/URI.js/issues/19) [byroot](https://github.com/byroot))
|
476
|
-
|
477
|
-
### 1.5.0 (February 19th 2012) ###
|
478
|
-
|
479
|
-
* adding Second Level Domain (SLD) Support - ([Issue #17](https://github.com/medialize/URI.js/issues/17))
|
480
|
-
|
481
|
-
### 1.4.3 (January 28th 2012) ###
|
482
|
-
|
483
|
-
* fixing global scope leakage - ([Issue #15](https://github.com/medialize/URI.js/issues/15) [mark-rushakoff](https://github.com/mark-rushakoff))
|
484
|
-
|
485
|
-
### 1.4.2 (January 25th 2012) ###
|
486
|
-
|
487
|
-
* improving CommonJS compatibility - ([Issue #14](https://github.com/medialize/URI.js/issues/14) [FGRibreau](https://github.com/FGRibreau))
|
488
|
-
|
489
|
-
### 1.4.1 (January 21st 2012) ###
|
490
|
-
|
491
|
-
* adding CommonJS compatibility - ([Issue #11](https://github.com/medialize/URI.js/issues/11), [Evangenieur](https://github.com/Evangenieur))
|
492
|
-
|
493
|
-
### 1.4.0 (January 12th 2012) ###
|
494
|
-
|
495
|
-
* adding [`URI.iso8859()`](http://medialize.github.io/URI.js/docs.html#static-iso8859) and [`URI.unicode()`](http://medialize.github.io/URI.js/docs.html#static-unicode) to switch base charsets - ([Issue #10](https://github.com/medialize/URI.js/issues/10), [mortenn](https://github.com/))
|
496
|
-
* adding [`.iso8859()`](http://medialize.github.io/URI.js/docs.html#iso8859) and [`.unicode()`](http://medialize.github.io/URI.js/docs.html#unicode) to convert an URI's escape encoding
|
497
|
-
|
498
|
-
### 1.3.1 (January 3rd 2011) ###
|
499
|
-
|
500
|
-
* updating Punycode.js to version 0.3.0
|
501
|
-
* adding edge-case tests ("jim")
|
502
|
-
* fixing edge-cases in .protocol(), .port(), .subdomain(), .domain(), .tld(), .filename()
|
503
|
-
* fixing parsing of hostname in [`.hostname()`](http://medialize.github.io/URI.js/docs.html#accessors-hostname)
|
504
|
-
|
505
|
-
### 1.3.0 (December 30th 2011) ###
|
506
|
-
|
507
|
-
* adding [`.subdomain()`](http://medialize.github.io/URI.js/docs.html#accessors-subdomain) convenience accessor
|
508
|
-
* improving internal deferred build handling
|
509
|
-
* fixing thrown Error for `URI("http://example.org").query(true)` - ([Issue #6](https://github.com/medialize/URI.js/issues/6))
|
510
|
-
* adding examples for extending URI.js for [fragment abuse](http://medialize.github.io/URI.js/docs.html#fragment-abuse), see src/URI.fragmentQuery.js and src/URI.fragmentURI.js - ([Issue #2](https://github.com/medialize/URI.js/issues/2))
|
511
|
-
|
512
|
-
### 1.2.0 (December 29th 2011) ###
|
513
|
-
|
514
|
-
* adding [`.equals()`](http://medialize.github.io/URI.js/docs.html#equals) for URL comparison
|
515
|
-
* fixing encoding/decoding for [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname), [`.directory()`](http://medialize.github.io/URI.js/docs.html#accessors-directory), [`.filename()`](http://medialize.github.io/URI.js/docs.html#accessors-filename) and [`.suffix()`](http://medialize.github.io/URI.js/docs.html#accessors-suffix) according to [RFC 3986 3.3](http://tools.ietf.org/html/rfc3986#section-3.3)
|
516
|
-
* fixing escape spaces in query strings with `+` according to [application/x-www-form-urlencoded](http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type)
|
517
|
-
* fixing to allow [`URI.buildQuery()`](http://medialize.github.io/URI.js/docs.html#static-buildQuery) to build duplicate key=value combinations
|
518
|
-
* fixing [`URI(string, string)`](http://medialize.github.io/URI.js/docs.html#constructor) constructor to conform with the [specification](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor)
|
519
|
-
* adding [`.readable()`](http://medialize.github.io/URI.js/docs.html#readable) for humanly readable representation of encoded URIs
|
520
|
-
* fixing bug where @ in pathname would be parsed as part of the authority
|
521
|
-
|
522
|
-
### 1.1.0 (December 28th 2011) ###
|
523
|
-
|
524
|
-
* adding [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString)
|
525
|
-
* adding [`.normalizeProtocol()`](http://medialize.github.io/URI.js/docs.html#normalize-protocol) to lowercase protocols
|
526
|
-
* fixing [`.normalizeHostname()`](http://medialize.github.io/URI.js/docs.html#normalize-host) to lowercase hostnames
|
527
|
-
* fixing String.substr() to be replaced by String.substring() - ([Issue #1](https://github.com/medialize/URI.js/issues/1))
|
528
|
-
* fixing parsing "?foo" to `{foo: null}` [Algorithm for collecting URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters)
|
529
|
-
* fixing building `{foo: null, bar: ""}` to "?foo&bar=" [Algorithm for serializing URL parameters](http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization)
|
530
|
-
* fixing RegExp escaping
|
531
|
-
|
532
|
-
### 1.0.0 (December 27th 2011) ###
|
533
|
-
|
534
|
-
* Initial URI.js
|
249
|
+
moved to [Changelog](./CHANGELOG.md)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
| Version | Supported |
|
6
|
+
| ------- | ------------------ |
|
7
|
+
| 1.19.x | :white_check_mark: |
|
8
|
+
| < 1.19.0 | :x: |
|
9
|
+
|
10
|
+
## Reporting a Vulnerability
|
11
|
+
|
12
|
+
Please ping the maintainer privately at mail+github@rodneyrehm.de :)
|
@@ -13,7 +13,3 @@ Thanks for your help!
|
|
13
13
|
Pull Requests go into the branch **master**. The *gh-pages* branch is a presentation of the *master* branch at the last given release.
|
14
14
|
|
15
15
|
Whenever you change code, make sure you run the test suite before sending a pull request. Please add tests for any features you add to the code base. We're using [QUnit](http://qunitjs.com/) for testing.
|
16
|
-
|
17
|
-
We're looking forward to splitting URI.js in several files, each dealing with a specific domain, to make the 1800 lines of code more bearable to work with. This will lead to using [Grunt](http://gruntjs.com/) to build a distributable version (and the removal of `build.html`). We're not sure when we'll get to this. If you want to pitch in, just holler!
|
18
|
-
|
19
|
-
|
@@ -2,21 +2,20 @@
|
|
2
2
|
* URI.js - Mutating URLs
|
3
3
|
* IPv6 Support
|
4
4
|
*
|
5
|
-
* Version: 1.
|
5
|
+
* Version: 1.19.10
|
6
6
|
*
|
7
7
|
* Author: Rodney Rehm
|
8
8
|
* Web: http://medialize.github.io/URI.js/
|
9
9
|
*
|
10
10
|
* Licensed under
|
11
11
|
* MIT License http://www.opensource.org/licenses/mit-license
|
12
|
-
* GPL v3 http://opensource.org/licenses/GPL-3.0
|
13
12
|
*
|
14
13
|
*/
|
15
14
|
|
16
15
|
(function (root, factory) {
|
17
16
|
'use strict';
|
18
17
|
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
19
|
-
if (typeof
|
18
|
+
if (typeof module === 'object' && module.exports) {
|
20
19
|
// Node
|
21
20
|
module.exports = factory();
|
22
21
|
} else if (typeof define === 'function' && define.amd) {
|
@@ -92,8 +91,6 @@
|
|
92
91
|
while (segments.length < total) {
|
93
92
|
segments.splice(pos, 0, '0000');
|
94
93
|
}
|
95
|
-
|
96
|
-
length = segments.length;
|
97
94
|
}
|
98
95
|
|
99
96
|
// strip leading zeros
|
@@ -177,7 +174,7 @@
|
|
177
174
|
if (root.IPv6 === this) {
|
178
175
|
root.IPv6 = _IPv6;
|
179
176
|
}
|
180
|
-
|
177
|
+
|
181
178
|
return this;
|
182
179
|
}
|
183
180
|
|
@@ -2,21 +2,20 @@
|
|
2
2
|
* URI.js - Mutating URLs
|
3
3
|
* Second Level Domain (SLD) Support
|
4
4
|
*
|
5
|
-
* Version: 1.
|
5
|
+
* Version: 1.19.10
|
6
6
|
*
|
7
7
|
* Author: Rodney Rehm
|
8
8
|
* Web: http://medialize.github.io/URI.js/
|
9
9
|
*
|
10
10
|
* Licensed under
|
11
11
|
* MIT License http://www.opensource.org/licenses/mit-license
|
12
|
-
* GPL v3 http://opensource.org/licenses/GPL-3.0
|
13
12
|
*
|
14
13
|
*/
|
15
14
|
|
16
15
|
(function (root, factory) {
|
17
16
|
'use strict';
|
18
17
|
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
19
|
-
if (typeof
|
18
|
+
if (typeof module === 'object' && module.exports) {
|
20
19
|
// Node
|
21
20
|
module.exports = factory();
|
22
21
|
} else if (typeof define === 'function' && define.amd) {
|
@@ -174,7 +173,12 @@
|
|
174
173
|
'ye':' co com gov ltd me net org plc ',
|
175
174
|
'yu':' ac co edu gov org ',
|
176
175
|
'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
|
177
|
-
'zm':' ac co com edu gov net org sch '
|
176
|
+
'zm':' ac co com edu gov net org sch ',
|
177
|
+
// https://en.wikipedia.org/wiki/CentralNic#Second-level_domains
|
178
|
+
'com': 'ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ',
|
179
|
+
'net': 'gb jp se uk ',
|
180
|
+
'org': 'ae',
|
181
|
+
'de': 'com '
|
178
182
|
},
|
179
183
|
// gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
|
180
184
|
// in both performance and memory footprint. No initialization required.
|
@@ -19,11 +19,15 @@
|
|
19
19
|
// uri.toString() === "http://example.org/#?bar=foo&name=value";
|
20
20
|
// uri.removeFragment("name");
|
21
21
|
// uri.toString() === "http://example.org/#?bar=foo";
|
22
|
+
// uri.setFragment("name", "value1");
|
23
|
+
// uri.toString() === "http://example.org/#?bar=foo&name=value1";
|
24
|
+
// uri.setFragment("name", "value2");
|
25
|
+
// uri.toString() === "http://example.org/#?bar=foo&name=value2";
|
22
26
|
|
23
27
|
(function (root, factory) {
|
24
28
|
'use strict';
|
25
29
|
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
26
|
-
if (typeof
|
30
|
+
if (typeof module === 'object' && module.exports) {
|
27
31
|
// Node
|
28
32
|
module.exports = factory(require('./URI'));
|
29
33
|
} else if (typeof define === 'function' && define.amd) {
|
@@ -57,12 +61,12 @@
|
|
57
61
|
p.fragment = function(v, build) {
|
58
62
|
var prefix = this._parts.fragmentPrefix;
|
59
63
|
var fragment = this._parts.fragment || '';
|
60
|
-
|
64
|
+
|
61
65
|
if (v === true) {
|
62
66
|
if (fragment.substring(0, prefix.length) !== prefix) {
|
63
67
|
return {};
|
64
68
|
}
|
65
|
-
|
69
|
+
|
66
70
|
return URI.parseQuery(fragment.substring(prefix.length));
|
67
71
|
} else if (v !== undefined && typeof v !== 'string') {
|
68
72
|
this._parts.fragment = prefix + URI.buildQuery(v);
|
@@ -96,9 +100,22 @@
|
|
96
100
|
this.build(!build);
|
97
101
|
return this;
|
98
102
|
};
|
103
|
+
p.setFragment = function(name, value, build) {
|
104
|
+
var prefix = this._parts.fragmentPrefix;
|
105
|
+
var data = URI.parseQuery((this._parts.fragment || '').substring(prefix.length));
|
106
|
+
URI.setQuery(data, name, value);
|
107
|
+
this._parts.fragment = prefix + URI.buildQuery(data);
|
108
|
+
if (typeof name !== 'string') {
|
109
|
+
build = value;
|
110
|
+
}
|
111
|
+
|
112
|
+
this.build(!build);
|
113
|
+
return this;
|
114
|
+
};
|
99
115
|
p.addHash = p.addFragment;
|
100
116
|
p.removeHash = p.removeFragment;
|
117
|
+
p.setHash = p.setFragment;
|
101
118
|
|
102
119
|
// extending existing object rather than defining something new
|
103
120
|
return URI;
|
104
|
-
}));
|
121
|
+
}));
|
@@ -20,7 +20,7 @@
|
|
20
20
|
(function (root, factory) {
|
21
21
|
'use strict';
|
22
22
|
// https://github.com/umdjs/umd/blob/master/returnExports.js
|
23
|
-
if (typeof
|
23
|
+
if (typeof module === 'object' && module.exports) {
|
24
24
|
// Node
|
25
25
|
module.exports = factory(require('./URI'));
|
26
26
|
} else if (typeof define === 'function' && define.amd) {
|