|
1 | 1 | /*! |
2 | | - * History API JavaScript Library v4.1.7 |
| 2 | + * History API JavaScript Library v4.1.8 |
3 | 3 | * |
4 | 4 | * Support: IE8+, FF3+, Opera 9+, Safari, Chrome and other |
5 | 5 | * |
|
11 | 11 | * http://www.opensource.org/licenses/mit-license.php |
12 | 12 | * http://www.gnu.org/licenses/gpl.html |
13 | 13 | * |
14 | | - * Update: 2014-05-19 16:57 |
| 14 | + * Update: 2014-06-05 11:54 |
15 | 15 | */ |
16 | 16 | (function(factory) { |
17 | 17 | if (typeof define === 'function' && define['amd']) { |
|
367 | 367 | function parseURL(href, isWindowLocation, isNotAPI) { |
368 | 368 | var re = /(?:([\w0-9]+:))?(?:\/\/(?:[^@]*@)?([^\/:\?#]+)(?::([0-9]+))?)?([^\?#]*)(?:(\?[^#]+)|\?)?(?:(#.*))?/; |
369 | 369 | if (href != null && href !== '' && !isWindowLocation) { |
370 | | - var current = parseURL(), _pathname = current._pathname, _protocol = current._protocol; |
| 370 | + var current = parseURL(), |
| 371 | + base = document.getElementsByTagName('base')[0]; |
| 372 | + if (!isNotAPI && base && base.getAttribute('href')) { |
| 373 | + // Fix for IE ignoring relative base tags. |
| 374 | + // See http://stackoverflow.com/questions/3926197/html-base-tag-and-local-folder-path-with-internet-explorer |
| 375 | + base.href = base.href; |
| 376 | + current = parseURL(base.href, null, true); |
| 377 | + } |
| 378 | + var _pathname = current._pathname, _protocol = current._protocol; |
371 | 379 | // convert to type of string |
372 | 380 | href = '' + href; |
373 | 381 | // convert relative link to the absolute |
|
0 commit comments