Hi,

On Thu, Apr 11, 2024 at 05:36:07PM +0200, a...@dismail.de wrote:

We may leave the value "about:blank" by default (and forbid ""), but
then, when opening a new tab, if the new_tab_url matches
"about:blank", we set it to NULL to leave the location empty, which
follows the current behavior. Maybe, something like this?

+   if (!url && strcmp(URL_STR(prefs.new_tab_page), "about:blank") !=
0)
+      url = prefs.new_tab_page;

That does seem like the most elegant solution for now. Thanks!

Merged in https://github.com/dillo-browser/dillo/pull/188

Empty URLs are used when parsing something like href="", so we cannot return an invalid URL in a_URL_new(), otherwise that causes a segfault in other parts (see #190).

So for now, I'm only making it invalid if the base URL is NULL, which covers the case when you set new_tab_page="", causing the newly open tab to just open a blank tab instead of "http:/".

Rodrigo.
_______________________________________________
Dillo-dev mailing list -- dillo-dev@mailman3.com
To unsubscribe send an email to dillo-dev-le...@mailman3.com

Reply via email to