Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Nette on Mac #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix for Nette on Mac #1

wants to merge 2 commits into from

Conversation

juzna
Copy link

@juzna juzna commented May 6, 2013

Make the launcher work with Nette framework's Tracy, which does escaping by default.

@juzna
Copy link
Author

juzna commented May 6, 2013

❤️ Loving it!

Yep as I'm looking at it, I'm guessing the path should not be escaped that much. But it works with TextMate.

@aik099
Copy link
Owner

aik099 commented May 6, 2013

I'm using PHPStorm a lot and was surprised that they don't have custom protocol handler build-in as other editors do.

Googling about the subject revealed some ideas, but their either did work (due being very old) or not compatible with PHPStorm. So I decided to implement it myself.

In any case need to contact https://github.com/nette/tracy about the problem and investigate how other editors (except TextMate) working with https://github.com/nette/tracy provided links.

@juzna
Copy link
Author

juzna commented May 6, 2013

I was looking into Tracy's history (previously it was part of Nette framework itself, only lately it got separated), and it's been there for very long time. Probably there was a reason? I guess other specials characters may need encoding in the URL.

Note that htmlspecialchars does not escape it again. And it is not enough, because URL needs to be escaped correctly by rawurlencode.

The app processing URLs shall be able to decode (de-encode) special chars. It PhpStormProtocol shall do the decoding.

@aik099
Copy link
Owner

aik099 commented May 6, 2013

Probably spaces. However your code specifically replaced %2F, which encoded /. Maybe we need to fix same stuff, that is escaped by rawurlencode literally. Also on Windows path separators are `' and your fix probably won't do anything.

@aik099
Copy link
Owner

aik099 commented May 13, 2014

@juzna any success with this? You might want to do rawurldecode on the url before giving it to Regexp.

Or maybe using LinCastor alternative (https://github.com/aik099/PhpStormProtocol/blob/master/LinCastor.md).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants