adampresley / sublime-view-in-browser

Open the contents of your current view/tab in a web browser
MIT License
271 stars 68 forks source link

Fails to open URL containing spaces on local server #44

Closed codepuncher closed 8 years ago

codepuncher commented 9 years ago

Seems like spaces need to be converted to %20 in order to launch the correct file in a local server.

When I hit CTRL+ALT+V, multiple Firefox tabs open.

Here's what my .sublime-project file contains:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "P:\\Operations\\Design\\Email designs"
        }
    ],
    "settings": {
        "sublime-view-in-browser": {
            "baseUrl": "http://griffin.gnm.office/flexshare/gingernut_share/Operations/Design/Email%20designs",
            "basePath": "P:\\Operations\\Design\\Email designs"
        }
    }
}

Open hitting CTRL+ALT+V to open P:/Operations/Design/Email designs/Pet Super Market/GNM_2250/html/d2/Final-design-2.html I get these tabs opened: image So you can see it gets cut off after Pet, and I cannot add in %20 myself as that would mean renaming the folder (multiple people work in these folders, so not an option).

Am using Sublime Text 3, Windows 7 SP1 64-bit. Console shows this: View In Browser plugin v2.0.0, Python 3 C:\Program Files (x86)\Mozilla Firefox\firefox.exe -new-tab http://griffin.gnm.office/flexshare/gingernut_share/Operations/Design/Email%20designs/Pet Super Market/GNM_2250/html/d2/Final-design-2.html

adampresley commented 8 years ago

The latest commit replaces spaces, and parenthesis. This should be addressed. My tests showed positive results.