Detected 1 occurrence(s) of ‘http:\/\/.*\.\.\/\.\.\/\.\.’: om/a/b")),"c/d/e.html"); assertEquals(u.toStringRelative(new URL("http://x.com/a/b?q=1")),"/a/b/c/d/e.html"); u.addParameter("q", 1); assertEquals(u.toStringRelative(new URL("http://x.com/a/b/c/d/e.html")),"?q=1"); assertEquals(u.toStringRelative(new URL("http://x.com/a/b/c/d/e/f/g/h")),"../../../../e.html?q=1"); assertEquals(u.toStringRelative(new URL("x.com/x/y/z/")),"../../../a/b/c/d/e.html?q=1"); assertEquals(u.toStringRelative(new URL("x.com/a/b/c/d/x/y/e.html")),"../../../e.html?q=1"); u.addParameter("f", "a b c"); assertEquals(u.toStringRelati Source: http://pastebin.com/raw.php?i=gX8WdUMX
↧