mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
LibWeb: Handle invalid URL in HtmlView::load()
This commit is contained in:
parent
520311eb8b
commit
07049f98ec
Notes:
sideshowbarker
2024-07-19 07:58:28 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/07049f98ecd Pull-request: https://github.com/SerenityOS/serenity/pull/1603
1 changed files with 5 additions and 0 deletions
|
@ -340,6 +340,11 @@ void HtmlView::load(const URL& url)
|
|||
{
|
||||
dbg() << "HtmlView::load: " << url.to_string();
|
||||
|
||||
if (!url.is_valid()) {
|
||||
load_error_page(url, "Invalid URL");
|
||||
return;
|
||||
}
|
||||
|
||||
if (window())
|
||||
window()->set_override_cursor(GUI::StandardCursor::None);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue