Skip to content

Conversation

@tpluscode
Copy link
Contributor

I found that templates were incorrectly produced, cells being not fully encoded as per RFC3986.

For example, parentheses were not percent-encoded, likely being done by JS' flawed implementation of encodeURIComponent

This PR switches to a different implementation of the RFC6570 spec which does the encoding correctly.

@@ -1,4 +1,5 @@
const fs = require('fs')
const encodeURIComponent = require('strict-uri-encode')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly related to the issue but I thought it useful to actually produce correct templates. While I did not observe any problems, according to the URI Templates spec, template variables should also be encoded

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.

1 participant