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

LibWebView: Invalid URLs no longer replaced with a ":" #24049

Closed
wants to merge 5 commits into from

Conversation

mackfi
Copy link

@mackfi mackfi commented Apr 21, 2024

Hi, we are students at the University of Utah working on a Ladybird fix for our final project.

Attempting to navigate to an invalid URL or a non-existent file path (as described in issue #22473) while search is disabled causes the path to be replaced with a colon. To fix this, we added an extra condition to return the URL rather than nothing (which gets interpreted as a colon).

Typing "catdog" into the search bar of a new tab:
Screenshot 2024-04-20 183329

Typing "catdog" into the search bar after this change:
Screenshot 2024-04-20 183156

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Apr 21, 2024
Comment on lines 96 to 98
auto result = query_public_suffix_list(url, search_engine);
if (!result.has_value())
return format_search_engine();
Copy link
Member

@MacDue MacDue Apr 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

search_engine is now passed to query_public_suffix_list, but it's not actually used there (other than to check if it has a value). Maybe format_search_engine() could just return input URL if the search engine is not available instead?

if (!search_engine.has_value())
return {};

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would seem to be a better solution. I have updated the line inside format_search_engine() that you mentioned, and removed the previous changes. This new change appears to have the exact same effect as the original change.

Copy link

stale bot commented May 12, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label May 12, 2024
Copy link

stale bot commented May 22, 2024

This pull request has been closed because it has not had recent activity. Feel free to re-open if you wish to still contribute these changes. Thank you for your contributions!

@stale stale bot closed this May 22, 2024
@github-actions github-actions bot removed the 👀 pr-needs-review PR needs review from a maintainer or community member label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants