1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +00:00

Ladybird: Allow loading 'data:' URLs from a search bar

This commit is contained in:
Karol Kosek 2023-07-06 15:26:59 +02:00 committed by Andreas Kling
parent 9ff706339b
commit 729aae8437

View file

@ -525,7 +525,7 @@ void Tab::navigate(QString url, LoadType load_type)
{
if (url.startsWith("/"))
url = "file://" + url;
else if (!url.startsWith("http://", Qt::CaseInsensitive) && !url.startsWith("https://", Qt::CaseInsensitive) && !url.startsWith("file://", Qt::CaseInsensitive) && !url.startsWith("about:", Qt::CaseInsensitive))
else if (!url.startsWith("http://", Qt::CaseInsensitive) && !url.startsWith("https://", Qt::CaseInsensitive) && !url.startsWith("file://", Qt::CaseInsensitive) && !url.startsWith("about:", Qt::CaseInsensitive) && !url.startsWith("data:", Qt::CaseInsensitive))
url = "https://" + url;
m_is_history_navigation = (load_type == LoadType::HistoryNavigation);
view().load(ak_deprecated_string_from_qstring(url));