Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

PUBLIC / surfer-okd

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 5f43935e authored 8 years ago by Johannes's avatar Johannes
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

ensure we deal with encoding of paths correctly on the client

1 parent 94ff5399
Show whitespace changes
Inline Side-by-side
Showing with 3 additions and 3 deletions
  • app/js/app.js
app/js/app.js
View file @5f43935
...@@ -105,18 +105,18 @@ function loadDirectory(filePath) { ...@@ -105,18 +105,18 @@ function loadDirectory(filePath) {
} }
function open(entry) { function open(entry) {
var path = encode(sanitize(app.path + '/' + entry.filePath)); var path = sanitize(app.path + '/' + entry.filePath);
if (entry.isDirectory) { if (entry.isDirectory) {
window.location.hash = path; window.location.hash = path;
return; return;
} }
window.open(path); window.open(encode(path));
} }
function up() { function up() {
window.location.hash = encode(sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'))); window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'));
} }
function upload() { function upload() {
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment