Commit 2e29385
URLs: percent-encode non-ASCII bytes before launching the browser
URLs with non-ASCII characters (Cyrillic Reddit thread titles,
CJK paths, accented hostnames) were passed verbatim through
wxLaunchDefaultBrowser, which on macOS routes through NSURL or
the `open` command — both want a strict RFC 3986 URI with ASCII
only. The raw UTF-8 bytes failed validation with EILSEQ
("Error 92: Illegal byte sequence") and the browser never opened.
The same URL pasted from the clipboard worked because browsers
do the IRI-to-URI dance themselves when reading an address-bar
input.
iri_to_uri() in util walks the string and percent-encodes any
byte >= 0x80 as %XX. ASCII passes through unchanged, which
includes the URL-reserved set (/, ?, #, &, =) so the URL
structure is preserved, and includes '%' so already-encoded
URLs are idempotent on a second pass.
Applied at every wxLaunchDefaultBrowser call site:
* action_open_in_browser (`b` from the listing)
* FeedsPanel right-click → Open in browser
* EntryDetail's link-label click
* EntryDetail's wxHtmlWindow link-click handler (inline links
inside the preview body)
Clipboard paths are untouched — action_copy_link still yanks
the original IRI so the user can paste it wherever they want
in the original Unicode shape.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1c9088a commit 2e29385
5 files changed
Lines changed: 43 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1443 | 1443 | | |
1444 | 1444 | | |
1445 | 1445 | | |
1446 | | - | |
| 1446 | + | |
| 1447 | + | |
1447 | 1448 | | |
1448 | 1449 | | |
1449 | 1450 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
317 | 337 | | |
318 | 338 | | |
319 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
153 | 168 | | |
154 | 169 | | |
155 | 170 | | |
| |||
0 commit comments