=> 531438897f22b812564e6b989192fea6c26e8b14
[1mdiff --git a/res/about/version.gmi b/res/about/version.gmi[m [1mindex b840987f..b3b29aef 100644[m [1m--- a/res/about/version.gmi[m [1m+++ b/res/about/version.gmi[m [36m@@ -9,6 +9,7 @@[m ## 1.0.3[m * Improved font glyph caching: only rasterize glyphs when drawing text, and retry after failure. This makes initial document layout faster and avoids issues with permanently lost glyphs.[m * Fixed parts of text disappearing when the glyph cache fills up. The cache also uses less memory now.[m [32m+[m[32m* Fixed percent-encoding of spaces when copying URLs to clipboard.[m * Fixed feed entry context menu showing the wrong menu item for Mark as Read/Unread.[m * Fixed parentheses and brackets being trimmed from feed entry titles.[m * Fixed quotes appearing continuous even when there are empty lines in between.[m [1mdiff --git a/src/gmutil.c b/src/gmutil.c[m [1mindex ab9a8eea..69fa6d9f 100644[m [1m--- a/src/gmutil.c[m [1m+++ b/src/gmutil.c[m [36m@@ -327,6 +327,12 @@[m [mvoid urlEncodeSpaces_String(iString *d) {[m }[m }[m [m [32m+[m[32mconst iString *withSpacesEncoded_String(const iString *d) {[m [32m+[m[32m iString *enc = copy_String(d);[m [32m+[m[32m urlEncodeSpaces_String(enc);[m [32m+[m[32m return collect_String(enc);[m [32m+[m[32m}[m [32m+[m const iString *feedEntryOpenCommand_String(const iString *url, int newTab) {[m if (!isEmpty_String(url)) {[m iString *cmd = collectNew_String();[m [1mdiff --git a/src/gmutil.h b/src/gmutil.h[m [1mindex 947ff56b..7227a072 100644[m [1m--- a/src/gmutil.h[m [1m+++ b/src/gmutil.h[m [36m@@ -110,5 +110,6 @@[m [mvoid urlEncodePath_String (iString *);[m iString * makeFileUrl_String (const iString *localFilePath);[m const char * makeFileUrl_CStr (const char *localFilePath);[m void urlEncodeSpaces_String (iString *);[m [32m+[m[32mconst iString * withSpacesEncoded_String(const iString *);[m [m const iString * feedEntryOpenCommand_String (const iString *url, int newTab); /* checks fragment */[m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex 423286ea..e5475ea5 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -1613,11 +1613,11 @@[m [mstatic iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)[m }[m else if (equal_Command(cmd, "document.copylink") && document_App() == d) {[m if (d->contextLink) {[m [31m- SDL_SetClipboardText(cstr_String([m [31m- absoluteUrl_String(d->mod.url, linkUrl_GmDocument(d->doc, d->contextLink->linkId))));[m [32m+[m[32m SDL_SetClipboardText(cstr_String(withSpacesEncoded_String(absoluteUrl_String([m [32m+[m[32m d->mod.url, linkUrl_GmDocument(d->doc, d->contextLink->linkId)))));[m }[m else {[m [31m- SDL_SetClipboardText(cstr_String(d->mod.url));[m [32m+[m[32m SDL_SetClipboardText(cstr_String(withSpacesEncoded_String(d->mod.url)));[m }[m return iTrue;[m }[m [1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex 85bd8b8b..6992bbec 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -514,8 +514,10 @@[m [mstatic size_t coordIndex_InputWidget_(const iInputWidget *d, iInt2 coord) {[m static iBool copy_InputWidget_(iInputWidget *d, iBool doCut) {[m if (!isEmpty_Range(&d->mark)) {[m const iRanges m = mark_InputWidget_(d);[m [31m- SDL_SetClipboardText(cstrCollect_String([m [31m- newUnicodeN_String(constAt_Array(&d->text, m.start), size_Range(&m))));[m [32m+[m[32m iString *str = collect_String(newUnicodeN_String(constAt_Array(&d->text, m.start),[m [32m+[m[32m size_Range(&m)));[m [32m+[m[32m SDL_SetClipboardText([m [32m+[m[32m cstr_String(d->inFlags & isUrl_InputWidgetFlag ? withSpacesEncoded_String(str) : str));[m if (doCut) {[m pushUndo_InputWidget_(d);[m deleteMarked_InputWidget_(d);[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex a4cfd8a9..46fab22d 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -734,7 +734,7 @@[m [mstatic iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)[m else if (isCommand_Widget(w, ev, "bookmark.copy")) {[m const iSidebarItem *item = d->contextItem;[m if (d->mode == bookmarks_SidebarMode && item) {[m [31m- SDL_SetClipboardText(cstr_String(&item->url));[m [32m+[m[32m SDL_SetClipboardText(cstr_String(withSpacesEncoded_String(&item->url)));[m }[m return iTrue;[m }[m [36m@@ -955,7 +955,7 @@[m [mstatic iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)[m else if (isCommand_Widget(w, ev, "history.copy")) {[m const iSidebarItem *item = d->contextItem;[m if (item && !isEmpty_String(&item->url)) {[m [31m- SDL_SetClipboardText(cstr_String(&item->url));[m [32m+[m[32m SDL_SetClipboardText(cstr_String(withSpacesEncoded_String(&item->url)));[m }[m return iTrue;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).