//! Titles of the pages Nacre shows for a failed load, a certificate error and a crash, so the browser can tell //! them from real pages. /// Title of the network error page; a tab showing it is treated as "failed to load". pub const ERROR_TITLE: &str = "Couldn't open this page"; pub const BAD_CERT_TITLE: &str = "Connection not secure"; #[allow(dead_code)] pub const CRASH_TITLE: &str = "This page crashed"; /// The certificate warning (shown in the page area in place of the site): `url` and what is wrong; its "Open /// anyway" goes to `nacre://allowcert`, which the browser takes only from this tab while the warning is up. pub fn bad_cert_page(url: &url::Url, why: &str) -> String { let page = include_str!("../assets/pages/badcert.html").replace("${url}", &crate::util::html_escape(url.as_str())).replace("${reason}", &crate::util::html_escape(why)); debug_assert!(page.contains(&format!("