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

URI encoding not working in Extractor #85

Closed
fabiodrg opened this issue Feb 17, 2021 · 1 comment · Fixed by #86
Closed

URI encoding not working in Extractor #85

fabiodrg opened this issue Feb 17, 2021 · 1 comment · Fixed by #86
Assignees
Labels
bug Something isn't working extractor Extractor related issues

Comments

@fabiodrg
Copy link
Collaborator

Example from calendar.js.

console.log(extractor.getName(event, true));
console.log(encodeURIComponent(extractor.getName(event, true)));

Output:

[AMAT2] - T - EaD
%5BAMAT2%5D%20-%20T%20-%20EaD

Notice the second parameter for extractor.getName is true, hence the return should be encoded.

@fabiodrg fabiodrg added bug Something isn't working extractor Extractor related issues labels Feb 17, 2021
@fabiodrg fabiodrg self-assigned this Feb 18, 2021
@fabiodrg
Copy link
Collaborator Author

So the problem is only individual event fields are encoded. If the description or event's name uses multiple fields joined with spaces or any other special characters, these are not encoded in parseStrFormat. A possible solution is to drop per field encoding (convertToURI), call parseStrFormat, and then encode the final string. Calling convertURI should be fine, but seems redundant with this approach. In fact, it would encode encoded text most likely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extractor Extractor related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant