3 <script type=
"text/javascript">
6 var item
= document
.createElement("li");
7 item
.appendChild(document
.createTextNode(message
));
8 document
.getElementById("console").appendChild(item
);
12 if (window
.testRunner
)
13 testRunner
.dumpAsText();
14 log("paths like this should turn all \\ characters into /: \"" + document
.getElementById("1").pathname
+ "\"");
15 log("query strings like this one should still have \\ characters: \"" + document
.getElementById("2").search
+ "\"");
16 log("query strings like this one should still have \\ characters even if the URL is only a query: \"" + document
.getElementById("3").search
+ "\"");
17 log("anchor strings like this one should still have \\ characters: \"" + document
.getElementById("4").hash
+ "\"");
18 log("anchor strings like this one should still have \\ characters even if the URL is only an anchor: \"" + document
.getElementById("5").hash
+ "\"");
22 <body onload=
"test()">
23 <p>This tests \ characters being changed to / in anchor tags.
</p>
24 <p>If it works you should see five messages below that have \ or / characters as specified.
</p>
26 <a id=
"1" href=
"file:\\\a\b\c\">1</a>
27 <a id=
"2" href=
"file:///?path=\\a\b\c\">2</a>
28 <a id=
"3" href=
"?path=\\myshare\myfolder\myfile\">3</a>
29 <a id=
"4" href=
"file:///#path=\\a\b\c\">4</a>
30 <a id=
"5" href=
"#path=\\myshare\myfolder\myfile\">5</a>
32 <p><ol id=
"console"></ol></p>