summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-15 19:36:45 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-15 19:36:45 +0300
commita69ee841cd3d8ce3bf8341fbe6e590614a6a0609 (patch)
treeca9c7425ac2827a6ea0edb6328fcdf3d03364d11 /src
parente71a07a126a761634d7cf45fbc49a4513ca34e95 (diff)
GmDocument: Recognize "about:" links
Diffstat (limited to 'src')
-rw-r--r--src/gmdocument.c3
-rw-r--r--src/gmdocument.h3
-rw-r--r--src/gmrequest.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c
index 650ccff6..723e3eaf 100644
--- a/src/gmdocument.c
+++ b/src/gmdocument.c
@@ -224,6 +224,9 @@ static iRangecc addLink_GmDocument_(iGmDocument *d, iRangecc line, iGmLinkId *li
224 else if (equalCase_Rangecc(parts.scheme, "data")) { 224 else if (equalCase_Rangecc(parts.scheme, "data")) {
225 link->flags |= data_GmLinkFlag; 225 link->flags |= data_GmLinkFlag;
226 } 226 }
227 else if (equalCase_Rangecc(parts.scheme, "about")) {
228 link->flags |= about_GmLinkFlag;
229 }
227 /* Check the file name extension, if present. */ 230 /* Check the file name extension, if present. */
228 if (!isEmpty_Range(&parts.path)) { 231 if (!isEmpty_Range(&parts.path)) {
229 iString *path = newRange_String(parts.path); 232 iString *path = newRange_String(parts.path);
diff --git a/src/gmdocument.h b/src/gmdocument.h
index e3c21097..5e5f282e 100644
--- a/src/gmdocument.h
+++ b/src/gmdocument.h
@@ -43,7 +43,8 @@ enum iGmLinkFlags {
43 http_GmLinkFlag = iBit(3), 43 http_GmLinkFlag = iBit(3),
44 file_GmLinkFlag = iBit(4), 44 file_GmLinkFlag = iBit(4),
45 data_GmLinkFlag = iBit(5), 45 data_GmLinkFlag = iBit(5),
46 supportedProtocol_GmLinkFlag = 0x1f, 46 about_GmLinkFlag = iBit(6),
47 supportedProtocol_GmLinkFlag = 0x3f,
47 remote_GmLinkFlag = iBit(9), 48 remote_GmLinkFlag = iBit(9),
48 userFriendly_GmLinkFlag = iBit(10), 49 userFriendly_GmLinkFlag = iBit(10),
49 imageFileExtension_GmLinkFlag = iBit(11), 50 imageFileExtension_GmLinkFlag = iBit(11),
diff --git a/src/gmrequest.c b/src/gmrequest.c
index 843d2f46..96276636 100644
--- a/src/gmrequest.c
+++ b/src/gmrequest.c
@@ -305,6 +305,9 @@ static const iBlock *aboutPageSource_(iRangecc path) {
305 if (equalCase_Rangecc(path, "help")) { 305 if (equalCase_Rangecc(path, "help")) {
306 return &blobHelp_Embedded; 306 return &blobHelp_Embedded;
307 } 307 }
308 if (equalCase_Rangecc(path, "license")) {
309 return &blobLicense_Embedded;
310 }
308 if (equalCase_Rangecc(path, "version")) { 311 if (equalCase_Rangecc(path, "version")) {
309 return &blobVersion_Embedded; 312 return &blobVersion_Embedded;
310 } 313 }