From 58a211d01d0f1a4bd6642c9d18253a083e574ef5 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 9 Apr 2025 17:19:50 +0400 Subject: [PATCH] Renamed a parameter in external link blocker template --- src/server/response.cpp | 2 +- static/templates/captured_external.html | 2 +- test/server.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/response.cpp b/src/server/response.cpp index 8e6707e2..9ece579e 100644 --- a/src/server/response.cpp +++ b/src/server/response.cpp @@ -417,7 +417,7 @@ BlockExternalLinkResponse::BlockExternalLinkResponse(const RequestContext& reque *this->m_data = Data(Data::Object{ {"root", root }, {"external_link_detected", Data::fromMsgId("external-link-detected") }, - {"source", externalUrl }, + {"url", externalUrl }, }); } diff --git a/static/templates/captured_external.html b/static/templates/captured_external.html index 24379880..f3470840 100644 --- a/static/templates/captured_external.html +++ b/static/templates/captured_external.html @@ -21,7 +21,7 @@

{{external_link_detected}}

You are about to leave Kiwix's ZIM reader to go online to

-

{{ source }}

+

{{ url }}

The link you're trying to access is not part of your offline package and requires an internet connection.

diff --git a/test/server.cpp b/test/server.cpp index dfd5b81b..2a2504a5 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -356,7 +356,7 @@ R"EXPECTEDRESULT( - window.KIWIX_RESPONSE_TEMPLATE = "<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n <title>{{external_link_detected}}</title>\n <link type="text/css" href="{{root}}/skin/error.css?cacheid=b3fa90cf" rel="Stylesheet" />\n <script type="module" src="{{root}}/skin/i18n.js?cacheid=e9a10ac1"></script>\n <script>\n window.KIWIX_RESPONSE_TEMPLATE = "{{KIWIX_RESPONSE_TEMPLATE}}";\n window.KIWIX_RESPONSE_DATA = {{{KIWIX_RESPONSE_DATA}}};\n </script>\n </head>\n <body>\n <header>\n <img src="{{root}}/skin/blocklink.svg?cacheid=bd56b116"\n alt="Caution!"\n aria-label="Caution!"\n title="Caution!">\n </header>\n <section class="intro">\n <h1>{{external_link_detected}}</h1>\n <p>You are about to leave Kiwix's ZIM reader to go online to</p>\n <p><a href="{{source}}">{{ source }}</a></p>\n </section>\n <section class="advice">\n <p>The link you're trying to access is not part of your offline package and requires an internet connection.</p>\n <p>If you can go online, you can attempt to open the link.</p>\n <p>You can otherwise return to your ZIM's offline content by using your browser's back button.</p>\n </section>\n </body>\n</html>\n"; + window.KIWIX_RESPONSE_TEMPLATE = "<!DOCTYPE html>\n<html>\n <head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />\n <title>{{external_link_detected}}</title>\n <link type="text/css" href="{{root}}/skin/error.css?cacheid=b3fa90cf" rel="Stylesheet" />\n <script type="module" src="{{root}}/skin/i18n.js?cacheid=e9a10ac1"></script>\n <script>\n window.KIWIX_RESPONSE_TEMPLATE = "{{KIWIX_RESPONSE_TEMPLATE}}";\n window.KIWIX_RESPONSE_DATA = {{{KIWIX_RESPONSE_DATA}}};\n </script>\n </head>\n <body>\n <header>\n <img src="{{root}}/skin/blocklink.svg?cacheid=bd56b116"\n alt="Caution!"\n aria-label="Caution!"\n title="Caution!">\n </header>\n <section class="intro">\n <h1>{{external_link_detected}}</h1>\n <p>You are about to leave Kiwix's ZIM reader to go online to</p>\n <p><a href="{{url}}">{{ url }}</a></p>\n </section>\n <section class="advice">\n <p>The link you're trying to access is not part of your offline package and requires an internet connection.</p>\n <p>If you can go online, you can attempt to open the link.</p>\n <p>You can otherwise return to your ZIM's offline content by using your browser's back button.</p>\n </section>\n </body>\n</html>\n";