| 14396 | } |
| 14397 | |
| 14398 | function decodePath(path, html5Mode) { |
| 14399 | var segments = path.split('/'), |
| 14400 | i = segments.length; |
| 14401 | |
| 14402 | while (i--) { |
| 14403 | segments[i] = decodeURIComponent(segments[i]); |
| 14404 | if (html5Mode) { |
| 14405 | // encode forward slashes to prevent them from being mistaken for path separators |
| 14406 | segments[i] = segments[i].replace(/\//g, '%2F'); |
| 14407 | } |
| 14408 | } |
| 14409 | |
| 14410 | return segments.join('/'); |
| 14411 | } |
| 14412 | |
| 14413 | function normalizePath(pathValue, searchValue, hashValue) { |
| 14414 | var search = toKeyValue(searchValue), |