-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Encode invalid URLs (unicode) #138
Comments
Currently, Amfora will actually send invalid URLs like the ones mentioned above to the server. This is invalid/buggy behaviour. |
Amfora will also accept URLs like |
Another thing to consider is that currently when a space is typed in the bottom bar, Amfora interprets that as a search query instead of a URL. With this new feature where invalid URLs will be converted, Amfora will have to add some more logic to detect the difference between a search and a non-encoded URL with a space. Since spaces are relatively rare, maybe a space could only be interpreted as part of a URL in these cases:
|
NFC normalization should also happen, before anything else. See this comment for details on implementing that. |
New search logic still needs to be implemented. |
That new logic was added in a0ae0ca. |
When amforma is given a string to search, if that string contains a valid protocol (gemini://), and that string contains trailing whitespace, then the string is treated as a search term. Although perhaps slightly more uncommon, if the input string was as a result of copy/paste then it's possible the string could contain trailing spaces, which is not what was intended, but rather should be removed so that it's treated either as a valid gemini:// link or a search term. Some efforts around this appeared in makew0rld#138
When amfora is given a string to search, if that string contains a valid protocol (gemini://), and that string contains trailing whitespace, then the string is treated as a search term. Although perhaps slightly more uncommon, if the input string was as a result of copy/paste then it's possible the string could contain trailing spaces, which is not what was intended, but rather should be removed so that it's treated either as a valid gemini:// link or a search term. Some efforts around this appeared in makew0rld#138
When amfora is given a string to search, if that string contains a valid protocol (gemini://), and that string contains trailing whitespace, then the string is treated as a search term. Although perhaps slightly more uncommon, if the input string was as a result of copy/paste then it's possible the string could contain trailing spaces, which is not what was intended, but rather should be removed so that it's treated either as a valid gemini:// link or a search term. Some efforts around this appeared in #138
If the user provides a URL like
gemini://example.com/蛸
orgemini://example.com/test?蛸
, then Amfora should detect that the URL is invalid, and encode it for them. The new encoded URL should be used everywhere, including in the bottom bar.The text was updated successfully, but these errors were encountered: