diff --git a/api/tests/test-router.js b/api/tests/test-router.js index af00bab6..0e05f14e 100644 --- a/api/tests/test-router.js +++ b/api/tests/test-router.js @@ -37,8 +37,8 @@ o.spec("route", function() { }) } - void [{protocol: "http:", hostname: "localhost"}, {protocol: "file:", hostname: "/"}].forEach(function(env) { - void ["#", "?", "", "#!", "?!", "/foo"].forEach(function(prefix) { + void [{protocol: "http:", hostname: "localhost"}, {protocol: "file:", hostname: "/"}, {protocol: "http:", hostname: "ööö"}].forEach(function(env) { + void ["#", "?", "", "#!", "?!", "/foo", "/föö"].forEach(function(prefix) { o.spec("using prefix `" + prefix + "` starting on " + env.protocol + "//" + env.hostname, function() { var $window, root, mountRedraw, route, throttleMock var nextID = 0 @@ -118,7 +118,7 @@ o.spec("route", function() { o(root.firstChild.nodeName).equals("DIV") }) - o("resolves to route w/ escaped unicode", function() { + o("resolves to route with escaped unicode", function() { $window.location.href = prefix + "/%C3%B6?%C3%B6=%C3%B6" route(root, "/ö", { "/ö" : { diff --git a/docs/style.css b/docs/style.css index c52039ae..5d359b9e 100644 --- a/docs/style.css +++ b/docs/style.css @@ -1,6 +1,6 @@ body {background:white;-webkit-text-size-adjust: 100%;} body,table,h5 {font-weight:normal;font-size:16px;font-family:'Open Sans',sans-serif;} -header,main {max-width:1000px;} +body>header,body>main {margin: auto;max-width:1000px;} header section {position:absolute;width:250px;} nav a {border-left:1px solid #ddd;padding:0 10px;} nav a:first-child {border:0;padding-left:0;} diff --git a/test-utils/domMock.js b/test-utils/domMock.js index 0140a210..7d284a47 100644 --- a/test-utils/domMock.js +++ b/test-utils/domMock.js @@ -462,7 +462,7 @@ module.exports = function(options) { if (!this.hasAttribute("href")) return "" // HACK: if it's valid already, there's nothing to implement. var value = this.attributes.href.value - if (validURLRegex.test(value)) return value + if (validURLRegex.test(encodeURI(value))) return value } return "[FIXME implement]" },