Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
1 files changed, 11 insertions, 0 deletions
-rw-r--r--badwolf.c11
diff --git a/badwolf.c b/badwolf.c
index 4d10719..52c2ab2 100644
--- a/badwolf.c
+++ b/badwolf.c
@@ -95,6 +95,17 @@ static void
notebookCb_switch__page(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data);
gint get_tab_position(GtkContainer *notebook, GtkWidget *child);
+/* ensure_uri_scheme: tries to add a scheme on a pseudo-URL missing a scheme
+ * - gchar text: pseudo-URL missing a scheme
+ * - gboolean try_file: when TRUE check try first if it can be a file:// path
+ *
+ * When `text` isn't exploitable (ie. NULL), returns "about:blank",
+ * when the URL seems to be valid, return it,
+ * if try_file is TRUE, check if it can be file:// path,
+ * some other checks might be added.
+ * In the end use the fallback (`http://` for now, might get configuration),
+ * might get some safeguard.
+ */
gchar *
ensure_uri_scheme(gchar *text, gboolean try_file)
{