diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 15:52:03 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-08 15:52:03 +0000 |
commit | 8f5970fd0cb8cc22e477b08888f1a3675607df2e (patch) | |
tree | a891930da5271cd49cafe4ff809c12667b652072 /net/base | |
parent | 173bf063a54257fcfa4cac7576d2822950d7af31 (diff) | |
download | chromium_src-8f5970fd0cb8cc22e477b08888f1a3675607df2e.zip chromium_src-8f5970fd0cb8cc22e477b08888f1a3675607df2e.tar.gz chromium_src-8f5970fd0cb8cc22e477b08888f1a3675607df2e.tar.bz2 |
Properly concatenate URL components in directory listing.
This time really properly.
TEST=none
http://crbug.com/20347
Review URL: http://codereview.chromium.org/196019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25624 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/dir_header.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/base/dir_header.html b/net/base/dir_header.html index 8e885e2..5505831 100644 --- a/net/base/dir_header.html +++ b/net/base/dir_header.html @@ -7,12 +7,16 @@ function addRow(name, url, isdir, size, date_modified) { if (name == ".") return; + var root = "" + document.location; + if (root.substr(-1) !== "/") + root += "/"; + var table = document.getElementById("table"); var row = document.createElement("tr"); var file_cell = document.createElement("td"); var link = document.createElement("a"); if (name == "..") { - link.href = document.location + "/.."; + link.href = root + ".."; link.innerText = document.getElementById("parentDirText").innerText; size = ""; date_modified = ""; @@ -23,7 +27,7 @@ function addRow(name, url, isdir, size, date_modified) { size = ""; } link.innerText = name; - link.href = document.location + "/" + url; + link.href = root + url; } file_cell.appendChild(link); |