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

Percent-encoding from URL doesn't decode all characters #7

Closed
nealhead opened this issue Aug 31, 2023 · 12 comments
Closed

Percent-encoding from URL doesn't decode all characters #7

nealhead opened this issue Aug 31, 2023 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@nealhead
Copy link

Describe the bug

I am using the Read from JSON/Write to JSON option with Decode/Encode Entities and it is MOSTLY working and decodes most of the options but doesn't seem to work for reserve characters like %3A and %3F. I tried decoding again with another TextManipulation block to no avail. If there is a way for me to grab logs for this let me know how.

Describe the expected behavior

I would expect all percent-encoded characters to be decoded.

What is your Node.js version?

Unknown

What is your n8n version?

1.4.1

What is your n8n-nodes-text-manipulation version?

1.2.0

What operating system are you seeing the problem on?

Linux

Operating system version (or if other, then please fill in complete name and version)

Unraid 6.11.5

Relevant log output

No response

@nealhead nealhead added the bug Something isn't working label Aug 31, 2023
@lublak
Copy link
Owner

lublak commented Aug 31, 2023

@nealhead hi. Thanks for the issue.
It is because decodeUri is used here.
I think this can be easily fixed and another decoding option offered for decodeUriComponent.

decodeURI('%3F%3A') => "%3F%3A"
decodeURIComponent('%3F%3A') => "?:"

I think I will publish something about it on Saturday.

@lublak
Copy link
Owner

lublak commented Sep 3, 2023

@nealhead sry some private issues appear at the weekend. I will work on in the next week :/

@nealhead
Copy link
Author

nealhead commented Sep 3, 2023

@nealhead sry some private issues appear at the weekend. I will work on in the next week :/

No rush from my end, thank you for your awesome plugin. Personal life should always come first!

@lublak
Copy link
Owner

lublak commented Sep 12, 2023

@nealhead Nevertheless, it's always problematic with my time :).
But thank you for your patience.

I fix it with this commit: 5f8121f

Is it possible for you too test this?

@nealhead
Copy link
Author

@nealhead Nevertheless, it's always problematic with my time :). But thank you for your patience.

I fix it with this commit: 5f8121f

Is it possible for you too test this?

I don't see a new release available

@lublak
Copy link
Owner

lublak commented Sep 13, 2023

@nealhead sry my fault.
Of course, one should also publish a new version and not forget it.
It should be installable in a few minutes now.

@nealhead
Copy link
Author

Looks like I have the same result.. Although I don't see "Url Component" under Decode/Encode Entities only Nothing, UrI, XML, HTML. Should there be another option for Url Component?

@lublak
Copy link
Owner

lublak commented Sep 14, 2023

@nealhead yes it should :o do you update it?

grafik
grafik

@nealhead
Copy link
Author

I don't seem to have that option:
image
And it appears to be up to date:
image

@lublak
Copy link
Owner

lublak commented Sep 15, 2023

@nealhead ah i think you need to restart n8n. There was some issues about this (months ago don't know if they have fixed it yet)

@nealhead
Copy link
Author

@lublak that did it! Thank you! The only thing I notice now is that + signs are still in place for spaces but I can fix that with a replace function. I'm not even sure if that is in spec for URI component.

@lublak
Copy link
Owner

lublak commented Sep 15, 2023

@lublak that did it! Thank you! The only thing I notice now is that + signs are still in place for spaces but I can fix that with a replace function. I'm not even sure if that is in spec for URI component.

Good to know! :) have fun with n8n!

@lublak lublak closed this as completed Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants