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

« back to all changes in this revision

Viewing changes to www/media/common/util.js

  • Committer: mattgiuca
  • Date: 2008-01-14 05:54:31 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:225
util.js: Yet more fixes for encoding/decoding URIs. build_url and parse_url
    had some instances of multiple encoding/decoding. Now confident they will
    correctly encode/decode just once.
browser.js: Combined settitle and presentpath (since they have very related
    actions, the one function just does both).

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
function dom_make_img(src, width, height, title, alt)
94
94
{
95
95
    var img = document.createElement("img");
96
 
    img.setAttribute("src", urlencode_path(src));
 
96
    img.setAttribute("src", src);
97
97
    if (width != null)
98
98
        img.setAttribute("width", width);
99
99
    if (height != null)
334
334
    for (var i=0; i<split.length; i++)
335
335
        split[i] = encodeURIComponent(split[i]);
336
336
    path = path_join.apply(null, split);
337
 
    if (split[0] == "" && split.length > 1) path = "/" + path;
 
337
    if (split[0] == "") path = "/" + path;
338
338
    return path;
339
339
}
340
340