~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/browser/browser.js

  • Committer: mattgiuca
  • Date: 2008-01-14 04:50:29 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:223
util.js: Added "urlencode_path" which is specially designed to encode paths.
         Added convenience function encoded_app_path.
         Ajax call now correctly encodes path.
listing, browser.js: All URLs generated are now correctly encoded (where they
        were sent unencoded before).

Show diffs side-by-side

added added

removed removed

Lines of Context:
352
352
    {
353
353
        if (dir == "") continue;
354
354
        /* Make an 'a' element */
355
 
        href_path = path_join(href_path, dir);
 
355
        href_path = urlencode_path(path_join(href_path, dir));
356
356
        nav_path = path_join(nav_path, dir);
357
357
        var link = dom_make_link_elem("a", dir, "Navigate to " + nav_path,
358
358
                href_path/*, "navigate(" + repr(href_path) + ")"*/);
415
415
    var div = document.createElement("div");
416
416
    files.appendChild(div);
417
417
    div.setAttribute("class", "padding");
418
 
    var download_link = make_path(path_join(download_app, path));
 
418
    var download_link = encoded_app_path(download_app, path);
419
419
    var par1 = dom_make_text_elem("p",
420
420
        "The file " + path + " is a binary file. To download this file, " +
421
421
        "click the following link:");