UI: Fix new error page

This commit is contained in:
SINF-KEN 2025-03-26 22:46:48 +01:00
parent f32cf33dee
commit d41e6cad09

View file

@ -648,11 +648,12 @@ void ViewImplementation::handle_web_content_process_crash(LoadErrorPage load_err
"p { font-size: 1rem; color: #555; }"
"</style></head><body>"sv);
builder.append("<header>"sv);
builder.append("<svg id=\"a\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17.5 21.5\">"sv);
builder.append("<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 17.5 21.5\">"sv);
builder.append("<path class=\"b\" d=\"M11.75.75h-9c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-13l-5-5z\"/>"sv);
builder.append("<path class=\"b\" d=\"M10.75.75v4c0 1.1.9 2 2 2h4M4.75 9.75l2 2M10.75 9.75l2 2M12.75 9.75l-2 2M6.75 9.75l-2 2M5.75 16.75c1-2.67 5-2.67 6 0\"/></svg>"sv);
auto escaped_url = escape_html_entities(m_url.to_byte_string());
builder.appendff("The web page <a href=\"{}\">{}</a> has crashed.<br><br>You can reload the page to try again.", escaped_url, escaped_url);
builder.append("<h1>Ladybird flew off-course!</h1>"sv);
builder.appendff("<p>The web page <a href=\"{}\">{}</a> has crashed.<br><br>You can reload the page to try again.</p>", escaped_url, escaped_url);
builder.append("</body></html>"sv);
load_html(builder.to_byte_string());
}