=> 672a534a044d811aa57e927288de50360882ac54
[1mdiff --git a/po/en.po b/po/en.po[m [1mindex 100cfb9f..aae67ff0 100644[m [1m--- a/po/en.po[m [1m+++ b/po/en.po[m [36m@@ -1670,6 +1670,9 @@[m [mmsgstr "Wrap plain text:"[m msgid "prefs.decodeurls"[m msgstr "Decode URLs:"[m [m [32m+[m[32mmsgid "prefs.urlsize"[m [32m+[m[32mmsgstr "Maximum URL size:"[m [32m+[m msgid "prefs.cachesize"[m msgstr "Cache size:"[m [m [1mdiff --git a/res/about/help.gmi b/res/about/help.gmi[m [1mindex 93bc6a05..5bf77a76 100644[m [1m--- a/res/about/help.gmi[m [1m+++ b/res/about/help.gmi[m [36m@@ -106,10 +106,15 @@[m [mThe type and destination of a link are indicated by the link's icon and color: [m [m Link colors remain the same regardless of which color theme is being used for page content. (Color themes are discussed in the Customization section.)[m [m [31m-When you move the mouse cursor over a link, additional information will appear: the destination domain, with the URL scheme shown for non-Gemini links, and the date of the last visit to the URL.[m [32m+[m[32mThe "Show URL on hover" option can be enabled in Preferences to show additional information when you move the mouse cursor over a link: the destination domain, URL scheme for non-Gemini links, date of the last visit to the URL, and the identity that will be used when opening the link.[m [m If a link would normally use the default ➤ icon but there is an Emoji at the beginning of the link label, that Emoji is used as the link icon instead. In these cases, you can always assume that the link is a Gemini link whose destination is the same domain that you're currently on.[m [m [32m+[m[32mThe "Network" tab of Preferences has a few settings that affect the presentation of links and URLs in general:[m [32m+[m [32m+[m[32m* "Decode URLs" causes percent-coding to be decoded for the user interface, so one can see international characters in URLs.[m [32m+[m[32m* "Maximum URL size" sets a limit for how long URLs can be. While Gemini servers are required to enforce a limit of 1024 bytes for URLs, this setting affects all URLs regardless of scheme. Link lines with URLs longer than this will be presented as plain text.[m [32m+[m ### 1.1.3 Page caching[m [m When navigating to a new page, the old page is cached in memory. If you navigate back, the cached copy of the page is restored. Think of it as rewinding time — you return to a past time as if nothing had happened. The same applies to forward navigation; cached pages are loaded if available. This allows back and forward navigation to happen instantly, without any network requests.[m [1mdiff --git a/res/lang/cs.bin b/res/lang/cs.bin[m [1mindex a45f34ca..a14c5cf4 100644[m Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ [1mdiff --git a/res/lang/de.bin b/res/lang/de.bin[m [1mindex 9b99e7ed..8dd9d478 100644[m Binary files a/res/lang/de.bin and b/res/lang/de.bin differ [1mdiff --git a/res/lang/en.bin b/res/lang/en.bin[m [1mindex 7b06807d..dd3389ef 100644[m Binary files a/res/lang/en.bin and b/res/lang/en.bin differ [1mdiff --git a/res/lang/eo.bin b/res/lang/eo.bin[m [1mindex 6c3bab91..c65c893c 100644[m Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ [1mdiff --git a/res/lang/es.bin b/res/lang/es.bin[m [1mindex f82aca48..a0f2a07f 100644[m Binary files a/res/lang/es.bin and b/res/lang/es.bin differ [1mdiff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin[m [1mindex e1956da3..e83f92e2 100644[m Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ [1mdiff --git a/res/lang/fi.bin b/res/lang/fi.bin[m [1mindex fc7ccab8..f390cdca 100644[m Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ [1mdiff --git a/res/lang/fr.bin b/res/lang/fr.bin[m [1mindex 44b391b4..c268b356 100644[m Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ [1mdiff --git a/res/lang/gl.bin b/res/lang/gl.bin[m [1mindex 583f7909..04311f53 100644[m Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ [1mdiff --git a/res/lang/hu.bin b/res/lang/hu.bin[m [1mindex 6776ea40..28ba0e48 100644[m Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ [1mdiff --git a/res/lang/ia.bin b/res/lang/ia.bin[m [1mindex 2659c595..27e3ba71 100644[m Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ [1mdiff --git a/res/lang/ie.bin b/res/lang/ie.bin[m [1mindex 33bc6419..244ade42 100644[m Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ [1mdiff --git a/res/lang/isv.bin b/res/lang/isv.bin[m [1mindex 23726e20..8c177e99 100644[m Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ [1mdiff --git a/res/lang/nl.bin b/res/lang/nl.bin[m [1mindex 32ec0205..2bdf4a71 100644[m Binary files a/res/lang/nl.bin and b/res/lang/nl.bin differ [1mdiff --git a/res/lang/pl.bin b/res/lang/pl.bin[m [1mindex 52e02876..129d34da 100644[m Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ [1mdiff --git a/res/lang/ru.bin b/res/lang/ru.bin[m [1mindex 7445fe10..ac407168 100644[m Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ [1mdiff --git a/res/lang/sk.bin b/res/lang/sk.bin[m [1mindex 76d4dd6f..099f0ccf 100644[m Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ [1mdiff --git a/res/lang/sr.bin b/res/lang/sr.bin[m [1mindex 11ab7e1d..e550a05a 100644[m Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ [1mdiff --git a/res/lang/tok.bin b/res/lang/tok.bin[m [1mindex 7e9b02d9..2bf27e86 100644[m Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ [1mdiff --git a/res/lang/tr.bin b/res/lang/tr.bin[m [1mindex c13d575f..6bd0c26c 100644[m Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ [1mdiff --git a/res/lang/uk.bin b/res/lang/uk.bin[m [1mindex 609b1c53..520f6c97 100644[m Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ [1mdiff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin[m [1mindex 904fe90d..81ea7de6 100644[m Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ [1mdiff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin[m [1mindex 9161c061..029551c7 100644[m Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ [1mdiff --git a/src/app.c b/src/app.c[m [1mindex 0f9249cc..a2ada36e 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -244,6 +244,7 @@[m [mstatic iString *serializePrefs_App_(const iApp *d) {[m appendFormat_String(str, "imageloadscroll arg:%d\n", d->prefs.loadImageInsteadOfScrolling);[m appendFormat_String(str, "cachesize.set arg:%d\n", d->prefs.maxCacheSize);[m appendFormat_String(str, "memorysize.set arg:%d\n", d->prefs.maxMemorySize);[m [32m+[m[32m appendFormat_String(str, "urlsize.set arg:%d\n", d->prefs.maxUrlSize);[m appendFormat_String(str, "decodeurls arg:%d\n", d->prefs.decodeUserVisibleURLs);[m appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth);[m appendFormat_String(str, "linespacing.set arg:%f\n", d->prefs.lineSpacing);[m [36m@@ -1974,6 +1975,8 @@[m [mstatic iBool handlePrefsCommands_(iWidget *d, const char *cmd) {[m toInt_String(text_InputWidget(findChild_Widget(d, "prefs.cachesize"))));[m postCommandf_App("memorysize.set arg:%d",[m toInt_String(text_InputWidget(findChild_Widget(d, "prefs.memorysize"))));[m [32m+[m[32m postCommandf_App("urlsize.set arg:%d",[m [32m+[m[32m toInt_String(text_InputWidget(findChild_Widget(d, "prefs.urlsize"))));[m postCommandf_App("ca.file path:%s",[m cstrText_InputWidget(findChild_Widget(d, "prefs.ca.file")));[m postCommandf_App("ca.path path:%s",[m [36m@@ -2771,6 +2774,13 @@[m [miBool handleCommand_App(const char *cmd) {[m }[m return iTrue;[m }[m [32m+[m[32m else if (equal_Command(cmd, "urlsize.set")) {[m [32m+[m[32m d->prefs.maxUrlSize = arg_Command(cmd);[m [32m+[m[32m if (d->prefs.maxUrlSize < 1024) {[m [32m+[m[32m d->prefs.maxUrlSize = 1024; /* Gemini protocol requirement */[m [32m+[m[32m }[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m else if (equal_Command(cmd, "searchurl")) {[m iString *url = &d->prefs.strings[searchUrl_PrefsString];[m setCStr_String(url, suffixPtr_Command(cmd, "address"));[m [36m@@ -3158,6 +3168,8 @@[m [miBool handleCommand_App(const char *cmd) {[m collectNewFormat_String("%d", d->prefs.maxCacheSize));[m setText_InputWidget(findChild_Widget(dlg, "prefs.memorysize"),[m collectNewFormat_String("%d", d->prefs.maxMemorySize));[m [32m+[m[32m setText_InputWidget(findChild_Widget(dlg, "prefs.urlsize"),[m [32m+[m[32m collectNewFormat_String("%d", d->prefs.maxUrlSize));[m setToggle_Widget(findChild_Widget(dlg, "prefs.decodeurls"), d->prefs.decodeUserVisibleURLs);[m setText_InputWidget(findChild_Widget(dlg, "prefs.searchurl"), &d->prefs.strings[searchUrl_PrefsString]);[m setText_InputWidget(findChild_Widget(dlg, "prefs.ca.file"), &d->prefs.strings[caFile_PrefsString]);[m [1mdiff --git a/src/gmdocument.c b/src/gmdocument.c[m [1mindex 63d100e2..5cae4138 100644[m [1m--- a/src/gmdocument.c[m [1m+++ b/src/gmdocument.c[m [36m@@ -333,13 +333,14 @@[m [mstatic iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li[m link->urlRange = capturedRange_RegExpMatch(&m, 1);[m setRange_String(&link->url, link->urlRange);[m set_String(&link->url, canonicalUrl_String(absoluteUrl_String(&d->url, &link->url)));[m [31m- if (startsWithCase_String(&link->url, "about:command")) {[m [31m- /* This is a special internal page that allows submitting UI events. */[m [31m- if (!d->enableCommandLinks) {[m [31m- delete_GmLink(link);[m [31m- *linkId = 0;[m [31m- return line;[m [31m- }[m [32m+[m[32m /* If invalid, disregard the link. */[m [32m+[m[32m if (size_String(&link->url) > prefs_App()->maxUrlSize ||[m [32m+[m[32m (startsWithCase_String(&link->url, "about:command")[m [32m+[m[32m /* this is a special internal page that allows submitting UI events */[m [32m+[m[32m && !d->enableCommandLinks)) {[m [32m+[m[32m delete_GmLink(link);[m [32m+[m[32m *linkId = 0;[m [32m+[m[32m return line;[m }[m /* Check the URL. */ {[m iUrl parts;[m [36m@@ -385,7 +386,7 @@[m [mstatic iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li[m iString *path = newRange_String(parts.path);[m if (endsWithCase_String(path, ".gif") || endsWithCase_String(path, ".jpg") ||[m endsWithCase_String(path, ".jpeg") || endsWithCase_String(path, ".png") ||[m [31m- endsWithCase_String(path, ".tga") || endsWithCase_String(path, ".psd") || [m [32m+[m[32m endsWithCase_String(path, ".tga") || endsWithCase_String(path, ".psd") ||[m #if defined (LAGRANGE_ENABLE_WEBP)[m endsWithCase_String(path, ".webp") ||[m #endif[m [1mdiff --git a/src/prefs.c b/src/prefs.c[m [1mindex 13a1dab7..cd86bf60 100644[m [1m--- a/src/prefs.c[m [1m+++ b/src/prefs.c[m [36m@@ -73,6 +73,7 @@[m [mvoid init_Prefs(iPrefs *d) {[m d->decodeUserVisibleURLs = iTrue;[m d->maxCacheSize = 10;[m d->maxMemorySize = 200;[m [32m+[m[32m d->maxUrlSize = 8192;[m setCStr_String(&d->strings[uiFont_PrefsString], "default");[m setCStr_String(&d->strings[headingFont_PrefsString], "default");[m setCStr_String(&d->strings[bodyFont_PrefsString], "default");[m [1mdiff --git a/src/prefs.h b/src/prefs.h[m [1mindex ea864f51..25bf56c4 100644[m [1m--- a/src/prefs.h[m [1m+++ b/src/prefs.h[m [36m@@ -172,6 +172,7 @@[m [mstruct Impl_Prefs {[m /* Network */[m int maxCacheSize; /* MB */[m int maxMemorySize; /* MB */[m [32m+[m[32m int maxUrlSize; /* bytes; longer ones will be disregarded */[m /* Style */[m iStringSet * disabledFontPacks;[m int gemtextAnsiEscapes;[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex 41f8eaa9..53ee8fda 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -2902,6 +2902,7 @@[m [miWidget *makePreferences_Widget(void) {[m appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.network}", '6', &headings, &values);[m addChild_Widget(headings, iClob(makeHeading_Widget("${prefs.decodeurls}")));[m addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls")));[m [32m+[m[32m addPrefsInputWithHeading_(headings, values, "prefs.urlsize", iClob(new_InputWidget(10)));[m /* Cache size. */ {[m iInputWidget *cache = new_InputWidget(4);[m setSelectAllOnFocus_InputWidget(cache, iTrue);[m
text/gemini; charset=utf-8
This content has been proxied by September (3851b).