| 14461 | } |
| 14462 | |
| 14463 | function decodePath(path, html5Mode) { |
| 14464 | var segments = path.split('/'), |
| 14465 | i = segments.length; |
| 14466 | |
| 14467 | while (i--) { |
| 14468 | segments[i] = decodeURIComponent(segments[i]); |
| 14469 | if (html5Mode) { |
| 14470 | // encode forward slashes to prevent them from being mistaken for path separators |
| 14471 | segments[i] = segments[i].replace(/\//g, '%2F'); |
| 14472 | } |
| 14473 | } |
| 14474 | |
| 14475 | return segments.join('/'); |
| 14476 | } |
| 14477 | |
| 14478 | function normalizePath(pathValue, searchValue, hashValue) { |
| 14479 | var search = toKeyValue(searchValue), |