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

URL-escape links to handle "weird" filenames #14

Closed
wants to merge 1 commit into from

Conversation

rickenharp
Copy link

I had some trouble with files containing the #-character. URL-escaping the link should avoid problems with unusual file names.

@copiousfreetime
Copy link
Owner

@rickenharp can you give an example? I'd like to have a test case if possible.

@rickenharp
Copy link
Author

Sure, if you have a file called "Example #1.txt", currently will generate a link to http://0.0.0.0:4331/Example%20#1.txt, which won't work because the unescaped hash is interpreted as a fragment identifier, resulting in the wrong link to '/Example%20' instead.

@copiousfreetime
Copy link
Owner

@rickenharp heel 3.1.3 released, please make sure this version fixes the problem for you.

@rickenharp
Copy link
Author

Works great, thanks. 👍

@copiousfreetime
Copy link
Owner

Perfect! thanks for the bug report

jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 15, 2014
## Version 3.1.3 - 2013-11-26
* URL encode the links to files [#14](copiousfreetime/heel#14)
* Fix pid file cleanup on ruby 2.0 [#15](copiousfreetime/heel#15)

## Version 3.1.2 - 2013-10-16
* Fix usage of Mime::Types [#12](copiousfreetime/heel#12) [#13](copiousfreetime/heel#13)

## Version 3.1.1 - 2013-09-29
* Fix request logging [#10](copiousfreetime/heel#10)
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 17, 2014
## Version 3.1.3 - 2013-11-26
* URL encode the links to files [#14](copiousfreetime/heel#14)
* Fix pid file cleanup on ruby 2.0 [#15](copiousfreetime/heel#15)

## Version 3.1.2 - 2013-10-16
* Fix usage of Mime::Types [#12](copiousfreetime/heel#12) [#13](copiousfreetime/heel#13)

## Version 3.1.1 - 2013-09-29
* Fix request logging [#10](copiousfreetime/heel#10)
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 11, 2014
## Version 3.1.3 - 2013-11-26
* URL encode the links to files [#14](copiousfreetime/heel#14)
* Fix pid file cleanup on ruby 2.0 [#15](copiousfreetime/heel#15)

## Version 3.1.2 - 2013-10-16
* Fix usage of Mime::Types [#12](copiousfreetime/heel#12) [#13](copiousfreetime/heel#13)

## Version 3.1.1 - 2013-09-29
* Fix request logging [#10](copiousfreetime/heel#10)
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