summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r--src/gmdocument.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 5cae4138..a3e233f3 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -334,7 +334,7 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
334 setRange_String(&link->url, link->urlRange); 334 setRange_String(&link->url, link->urlRange);
335 set_String(&link->url, canonicalUrl_String(absoluteUrl_String(&d->url, &link->url))); 335 set_String(&link->url, canonicalUrl_String(absoluteUrl_String(&d->url, &link->url)));
336 /* If invalid, disregard the link. */ 336 /* If invalid, disregard the link. */
337 if (size_String(&link->url) > prefs_App()->maxUrlSize || 337 if ((d->format == gemini_SourceFormat && size_String(&link->url) > prefs_App()->maxUrlSize) ||
338 (startsWithCase_String(&link->url, "about:command") 338 (startsWithCase_String(&link->url, "about:command")
339 /* this is a special internal page that allows submitting UI events */ 339 /* this is a special internal page that allows submitting UI events */
340 && !d->enableCommandLinks)) { 340 && !d->enableCommandLinks)) {
@@ -371,7 +371,11 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
371 } 371 }
372 else if (equalCase_Rangecc(parts.scheme, "data")) { 372 else if (equalCase_Rangecc(parts.scheme, "data")) {
373 setScheme_GmLink_(link, data_GmLinkScheme); 373 setScheme_GmLink_(link, data_GmLinkScheme);
374 if (startsWith_Rangecc(parts.path, "image/")) { 374 if (startsWith_Rangecc(parts.path, "image/png") ||
375 startsWith_Rangecc(parts.path, "image/jpg") ||
376 startsWith_Rangecc(parts.path, "image/jpeg") ||
377 startsWith_Rangecc(parts.path, "image/webp") ||
378 startsWith_Rangecc(parts.path, "image/gif")) {
375 link->flags |= imageFileExtension_GmLinkFlag; 379 link->flags |= imageFileExtension_GmLinkFlag;
376 } 380 }
377 } 381 }