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

encodeURI the profile name in the link #358

Merged
merged 3 commits into from
Nov 10, 2023
Merged

Conversation

Zir0h
Copy link
Contributor

@Zir0h Zir0h commented Nov 10, 2023

@jagracar found that the profile link on https://teia.art/objkt/839464/history doesn't work, however the on in history does. I compared the 2 hrefs and found that the history one gets encodeURI()'d while the other one doesn't.

You get "user not found" instead
2023-11-10-141839_536x252_scrot

Copy link

github-actions bot commented Nov 10, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-11-10 15:24 UTC

@jagracar
Copy link
Member

Probably we also need to add it to the username link on the threads

@jagracar
Copy link
Member

https://github.com/search?q=repo%3Ateia-community%2Fteia-ui%20profile.name&type=code

@melMass
Copy link
Member

melMass commented Nov 10, 2023

What does encodeURI does on Jimberton?

node
Welcome to Node.js v20.9.0.
Type ".help" for more information.
> encodeURI("Jim")
'Jim'
> encodeURI("/Jim")
'/Jim'

@Zir0h
Copy link
Contributor Author

Zir0h commented Nov 10, 2023

What does encodeURI does on Jimberton?

❯ node
Welcome to Node.js v20.9.0.
Type ".help" for more information.
> encodeURI("Jim")
'Jim'
> encodeURI("/Jim")
'/Jim'

That subjkt has a trailing space, so it's actually /Jimberton and not /Jimberton. The UI should generate https://teia.art/Jimberton%20 and not just drop the trailing space.

@melMass
Copy link
Member

melMass commented Nov 10, 2023

That subjkt has a trailing space, so it's actually /Jimberton and not /Jimberton.

OMG 🤣

@melMass
Copy link
Member

melMass commented Nov 10, 2023

Feel free to merge!

@Zir0h Zir0h merged commit 8a44851 into main Nov 10, 2023
3 checks passed
@Zir0h Zir0h deleted the fix-profile-link-with-spaces branch November 10, 2023 15:23
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