-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Labels
Description
Valid UTF-8-percent-encoded code points must be preserved in reserved expansion. This implementation (Version: 4.1.1) fails the following test from https://github.com/uri-templates/uritemplate-test/blob/master/extended-tests.json:
{
...
"Additional Examples 6: Reserved Expansion": {
"variables" : {
"id" : "admin%2F",
...
},
"testcases": [
["{+id}", "admin%2F"],
...
]
}
The correct/expected expansion is 'admin%2F', the actual expansion is 'admin%252F':
>>> from uritemplate import URITemplate, expand
>>> URITemplate('{+id}').expand(id='admin%2F')
'admin%252F'
>>> expand('{+id}', id='admin%2F')
'admin%252F'