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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/browser.js

  • Committer: Matt Giuca
  • Date: 2010-02-18 07:55:53 UTC
  • Revision ID: matt.giuca@gmail.com-20100218075553-d7qcind022hp8kaw
browser.js: submit now decodes the URL of a file before submitting it. This ensures that files with 'special' characters are treated correctly before being sent in a POST request (since the URLs come URL-encoded, not decoding them first would result in double-encoding). Fixes Launchpad bug #523656.

Show diffs side-by-side

added added

removed removed

Lines of Context:
860
860
            stat = file_listing[selected_files[0]];
861
861
        else
862
862
            stat = current_file;
863
 
        path = stat.svnurl.substr(svn_base.length);
 
863
        url = stat.svnurl.substr(svn_base.length);      // URL-encoded
 
864
        path = decodeURIComponent(url);
864
865
 
865
866
        /* The working copy might not have an up-to-date version of the
866
867
         * directory. While submitting like this could yield unexpected
871
872
            {"action": "svnrepostat", "path": path},
872
873
            function(result)
873
874
            {
874
 
                window.location = path_join(app_path('+submit'), path) + '?revision=' + result.svnrevision;
 
875
                window.location = path_join(app_path('+submit'), url) + '?revision=' + result.svnrevision;
875
876
            },
876
877
            "json");
877
878