Skip to content

urlencode path values for url() - #150

Closed
benallfree wants to merge 1 commit into
CodeSleeve:masterfrom
benallfree:url_fix
Closed

benallfree wants to merge 1 commit into
CodeSleeve:masterfrom
benallfree:url_fix

Conversation

@benallfree

Copy link
Copy Markdown
Contributor

Fixes #146

@kyranb

kyranb commented Jan 9, 2016

Copy link
Copy Markdown

Thanks! 🙇

@tabennett

Copy link
Copy Markdown
Contributor

While this may be a quick fix for the problem, it's really not something that I want merged into the codebase. Adding more and more parameter passing into these methods of these classes isn't really a scalable solution; There's no possible way to cover all scenarios that people are going to come up with. I would much rather prefer the use of inheritance (for the interpolator) to fix this issue.

We already have the ability to bind implementations for an interpolator (so that users can substitute their own interpolator implementations). Taking that a step further, because we only need perform that check and url encoding if we're interpolation a url, why can't we have two interpolators (1 for paths, 1 for urls) that both extend the base interpolator (for shared functionality) but have different implementations (the url interpolator will encode values).

@benallfree

Copy link
Copy Markdown
Contributor Author

Good idea, I'll look at a refactor!

@benallfree

Copy link
Copy Markdown
Contributor Author

I think this is fixed by #167 and isn't needed anymore.

@benallfree

Copy link
Copy Markdown
Contributor Author

Closing, I think it's not needed.

@benallfree benallfree closed this Jan 25, 2018
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.

3 participants