Review Board

beta

Escape Subversion URLs

Updated 8 months, 2 weeks ago

Dan Sheridan Reviewers
reviewboard
None Review Board SVN
This patch escapes the URL passed to Subversion so that paths with spaces in them work correctly. Without this, a cryptic "Malformed repository URL" message is shown to the user when submitting via the new review request form.
Verified working with patches to files with spaces in the filenames and spaces in the paths, for both http:// and file:/// repository URLs.
Posted 8 months, 3 weeks ago (April 18th, 2008, 7:01 p.m.)

   

  
Loading diff fragment...
Also, it seems like __normalize_path is a natural place for this to go, instead of here.
  1. Dan Sheridan 8 months, 3 weeks ago (April 21st, 2008, 2:30 a.m.)
    Well, yes and no. __normalize_path seems to be about figuring out whether the path is relative to the repo or already includes the repo. Escaping seems like a different task. I'm happy to do it either way though.
  2. David Trowbridge 8 months, 3 weeks ago (April 21st, 2008, 3:07 p.m.)
    OK, I guess that makes sense.  It's fine to leave this here.
Loading diff fragment...
Can you add a comment explaining why this is here?
  1. Dan Sheridan 8 months, 3 weeks ago (April 21st, 2008, 2:30 a.m.)
    Do you mean the urlsplit or the whole block of code? (the urlsplit is there to avoid escaping the : in http://)
  2. David Trowbridge 8 months, 3 weeks ago (April 21st, 2008, 3:07 p.m.)
    I mean the whole block.
  3. Dan Sheridan 8 months, 3 weeks ago (April 22nd, 2008, 2:58 a.m.)
    See updated patch
Ship it!
Posted 8 months, 2 weeks ago (April 22nd, 2008, 12:33 p.m.)
Committed as r1310.  Thanks!