From 8e65e4e8559a602d55481f65cafcf525b616a23f Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Sat, 25 Apr 2026 11:02:49 -0700 Subject: [PATCH] Disable URL syntax highlighting when no protocol is specified. https://redmine.stoutner.com/issues/1280 --- changelog | 19 ++++++ doc/index.docbook | 69 ++++++++++++++------ src/com.stoutner.privacybrowser.metainfo.xml | 24 ++++++- src/main.cpp | 6 +- src/privacybrowser.1 | 4 +- src/widgets/UrlLineEdit.cpp | 22 +++++-- 6 files changed, 112 insertions(+), 32 deletions(-) diff --git a/changelog b/changelog index fd868c4..73a8503 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,22 @@ +# Version 0.9 (25 April 2026) + * Enable JavaScript copying to the clipboard with user interaction. + * Fix populating the URL for slowly loading websites when the tab is switch while they are loading. + * Don’t expand the bookmarks folders when opening the bookmarks dialog. + * Preserve the scroll position when moving a bookmark in the bookmarks dialog. + * Fix URL syntax highlighting when no protocol is specified. + * Open new tabs adjacent to the current tab. + * Make the text in the requests dialog non-editable. + * Widen the domain settings dialog to prevent the need for horizontal scrolling on some screens. + * Separate filter list applied entries with four spaces instead of an asterisk. + * Fix "generichide" creating incorrect allow filters. + * Add WebSocket support to the filter lists. + * Block all prefetch, preload, and CSP requests. + * Improve the padding around the blocked requests tracker. + * Fix the request color highlighting for allow lists. + * Fix the initial size of the developer console to be the bottom half of the screen. + * Display the zoom factor correctly when changed by CTRL-Scrolling. + * Clarify that Fanboy's Annoyance Lists’s license is just Creative Commons Attribution 3.0 Unported. + # Version 0.8 (30 January 2025) * Fix the WebEngine reloading the current URL when trying to load a new URL with a different user agent. This also fixes three related bugs. * Disable opening of links with an _blank target in a new tab, which also resolved two other bugs. diff --git a/doc/index.docbook b/doc/index.docbook index 532ab16..62cabf1 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -45,10 +45,10 @@ &FDLNotice; - 2026-03-02 + 2026-04-25 - &privacybrowser; version 0.8 + &privacybrowser; version 0.9 @@ -1842,6 +1842,37 @@ Changelog + + + <ulink url="https://www.stoutner.com/privacy-browser-pc-0.9/">0.9</ulink> - + 25 April 2026 + + + Enable JavaScript copying to the clipboard with user interaction. + Fix populating the URL for slowly loading websites when the tab is switch while they are loading. + + Don’t expand the bookmarks folders when opening the bookmarks dialog. + Preserve the scroll position when moving a bookmark in the bookmarks dialog. + Fix URL syntax highlighting when no protocol is specified. + Open new tabs adjacent to the current tab. + Make the text in the requests dialog non-editable. + Widen the domain settings dialog to prevent the need for horizontal scrolling on some screens. + + Separate filter list applied entries with four spaces instead of an asterisk. + Fix "generichide" creating incorrect allow filters. + Add WebSocket support to the filter lists. + Block all prefetch, + preload, and + CSP requests. + Improve the padding around the blocked requests tracker. + Fix the request color highlighting for allow lists. + Fix the initial size of the developer console to be the bottom half of the screen. + Display the zoom factor correctly when changed by CTRL-Scrolling. + Clarify that Fanboy's Annoyance Lists’s license is just Creative Commons Attribution 3.0 Unported. + + + + <ulink url="https://www.stoutner.com/privacy-browser-pc-0.8/">0.8</ulink> - @@ -1849,12 +1880,12 @@ <itemizedlist> <listitem><para>Fix the <ulink url="https://redmine.stoutner.com/issues/821">WebEngine reloading the current URL</ulink> when trying to load a new URL with a different user agent. - This also fixes <ulink url="https://redmine.stoutner.com/issues/1007">three</ulink> - <ulink url="https://redmine.stoutner.com/issues/1213">related</ulink> - <ulink url="https://redmine.stoutner.com/issues/1246">bugs</ulink>.</para></listitem> + This also fixes <ulink url="https://redmine.stoutner.com/issues/1007">three</ulink> + <ulink url="https://redmine.stoutner.com/issues/1213">related</ulink> + <ulink url="https://redmine.stoutner.com/issues/1246">bugs</ulink>.</para></listitem> <listitem><para>Disable opening of links with an <code>_blank</code> target <ulink url="https://redmine.stoutner.com/issues/967">in a new tab</ulink>, - which also resolved <ulink url="https://redmine.stoutner.com/issues/1008">two</ulink> - <ulink url="https://redmine.stoutner.com/issues/1268">other</ulink> bugs.</para></listitem> + which also resolved <ulink url="https://redmine.stoutner.com/issues/1008">two</ulink> + <ulink url="https://redmine.stoutner.com/issues/1268">other</ulink> bugs.</para></listitem> <listitem><para>Disable the <ulink url="https://redmine.stoutner.com/issues/1266">web cache</ulink>.</para></listitem> <listitem><para>Fix the background color of <ulink url="https://redmine.stoutner.com/issues/1252">highlighted combo boxes</ulink> in Domain Settings.</para></listitem> <listitem><para><ulink url="https://redmine.stoutner.com/issues/1269">Hardcode the dictionary path</ulink> if the environment variable is not set.</para></listitem> @@ -1911,21 +1942,21 @@ <listitem><para>Add <ulink url="https://redmine.stoutner.com/issues/1024">URL syntax highlighting</ulink>.</para></listitem> <listitem><para>Add a <ulink url="https://redmine.stoutner.com/issues/1126">DevTools interface</ulink>.</para></listitem> <listitem><para>Implement <ulink url="https://redmine.stoutner.com/issues/1088">opening</ulink> and - <ulink url="https://redmine.stoutner.com/issues/866">saving</ulink> of MHT web archives.</para></listitem> + <ulink url="https://redmine.stoutner.com/issues/866">saving</ulink> of MHT web archives.</para></listitem> <listitem><para>Handle <ulink url="https://redmine.stoutner.com/issues/898">HTTP authentication</ulink>.</para></listitem> <listitem><para>Remember the <ulink url="https://redmine.stoutner.com/issues/1103">download directory</ulink>.</para></listitem> <listitem><para>Update bookmarks <ulink url="https://redmine.stoutner.com/issues/1095">in all windows</ulink> when modified.</para></listitem> <listitem><para>Display <ulink url="https://redmine.stoutner.com/issues/1108">Unicode URLs in Punycode</ulink>.</para></listitem> <listitem><para><ulink url="https://redmine.stoutner.com/issues/1151">Multiple</ulink> - <ulink url="https://redmine.stoutner.com/issues/1141">small</ulink> - <ulink url="https://redmine.stoutner.com/issues/1101">improvements</ulink> - <ulink url="https://redmine.stoutner.com/issues/1080">to</ulink> - <ulink url="https://redmine.stoutner.com/issues/1110">the</ulink> - <ulink url="https://redmine.stoutner.com/issues/1179">code</ulink> - <ulink url="https://redmine.stoutner.com/issues/1092">and</ulink> - <ulink url="https://redmine.stoutner.com/issues/1096">the</ulink> - <ulink url="https://redmine.stoutner.com/issues/1150">user</ulink> - <ulink url="https://redmine.stoutner.com/issues/1149">experience</ulink>.</para></listitem> + <ulink url="https://redmine.stoutner.com/issues/1141">small</ulink> + <ulink url="https://redmine.stoutner.com/issues/1101">improvements</ulink> + <ulink url="https://redmine.stoutner.com/issues/1080">to</ulink> + <ulink url="https://redmine.stoutner.com/issues/1110">the</ulink> + <ulink url="https://redmine.stoutner.com/issues/1179">code</ulink> + <ulink url="https://redmine.stoutner.com/issues/1092">and</ulink> + <ulink url="https://redmine.stoutner.com/issues/1096">the</ulink> + <ulink url="https://redmine.stoutner.com/issues/1150">user</ulink> + <ulink url="https://redmine.stoutner.com/issues/1149">experience</ulink>.</para></listitem> </itemizedlist> </sect1> @@ -1937,11 +1968,11 @@ <itemizedlist> <listitem><para>Add <ulink url="https://redmine.stoutner.com/issues/968">bookmarks</ulink>.</para></listitem> <listitem><para>Add <ulink url="https://redmine.stoutner.com/issues/1031">zoom controls</ulink> to the status bar and a - <ulink url="https://redmine.stoutner.com/issues/1044">default zoom shortcut</ulink>.</para></listitem> + <ulink url="https://redmine.stoutner.com/issues/1044">default zoom shortcut</ulink>.</para></listitem> <listitem><para>Add <ulink url="https://redmine.stoutner.com/issues/1037">keyboard shortcuts</ulink> for the URL toolbar actions.</para></listitem> <listitem><para>Add an action to <ulink url="https://redmine.stoutner.com/issues/1022">view page source</ulink>.</para></listitem> <listitem><para>Change the <ulink url="https://redmine.stoutner.com/issues/1019">domain settings combo boxes</ulink> to list - <code>enabled</code> above <code>disabled</code>.</para></listitem> + <code>enabled</code> above <code>disabled</code>.</para></listitem> <listitem><para>File downloads can now <ulink url="https://redmine.stoutner.com/issues/869">show the size</ulink> before the download begins.</para></listitem> <listitem><para>Add PIE (<ulink url="https://redmine.stoutner.com/issues/1021">Position Independent Executable</ulink>) compiler flags.</para></listitem> <listitem><para>Fix a bug that sometimes allowed <ulink url="https://redmine.stoutner.com/issues/1018">multiple domain settings to be created</ulink>.</para></listitem> diff --git a/src/com.stoutner.privacybrowser.metainfo.xml b/src/com.stoutner.privacybrowser.metainfo.xml index 26465b9..8f9a98e 100644 --- a/src/com.stoutner.privacybrowser.metainfo.xml +++ b/src/com.stoutner.privacybrowser.metainfo.xml @@ -2,7 +2,7 @@ <!-- SPDX-License-Identifier: GPL-3.0-or-later - SPDX-FileCopyrightText: 2022-2024 Soren Stoutner <soren@stoutner.com> + SPDX-FileCopyrightText: 2022-2026 Soren Stoutner <soren@stoutner.com> This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>. @@ -57,6 +57,28 @@ <launchable type="desktop-id">com.stoutner.privacybrowser.desktop</launchable> <releases> + <release version="0.9" date="2026-04-25"> + <description> + <p>Enable JavaScript copying to the clipboard with user interaction.</p> + <p>Fix populating the URL for slowly loading websites when the tab is switch while they are loading.</p> + <p>Don’t expand the bookmarks folders when opening the bookmarks dialog.</p> + <p>Preserve the scroll position when moving a bookmark in the bookmarks dialog.</p> + <p>Fix URL syntax highlighting when no protocol is specified.</p> + <p>Open new tabs adjacent to the current tab.</p> + <p>Make the text in the requests dialog non-editable.</p> + <p>Widen the domain settings dialog to prevent the need for horizontal scrolling on some screens.</p> + <p>Separate filter list applied entries with four spaces instead of an asterisk.</p> + <p>Fix "generichide" creating incorrect allow filters.</p> + <p>Add WebSocket support to the filter lists.</p> + <p>Block all prefetch, preload, and CSP requests.</p> + <p>Improve the padding around the blocked requests tracker.</p> + <p>Fix the request color highlighting for allow lists.</p> + <p>Fix the initial size of the developer console to be the bottom half of the screen.</p> + <p>Display the zoom factor correctly when changed by CTRL-Scrolling.</p> + <p>Clarify that Fanboy's Annoyance Lists’s license is just Creative Commons Attribution 3.0 Unported.</p> + </description> + </release> + <release version="0.8" date="2025-01-30"> <description> <p>Fix the WebEngine reloading the current URL when trying to load a new URL with a different user agent. This also fixes three related bugs.</p> diff --git a/src/main.cpp b/src/main.cpp index 9b41069..06331a2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2022-2025 Soren Stoutner <soren@stoutner.com> + * SPDX-FileCopyrightText: 2022-2026 Soren Stoutner <soren@stoutner.com> * * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>. * @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) KCrash::initialize(); // Instantiate about data, setting the component name, the display name, and the version. - KAboutData aboutData(QLatin1String("privacybrowser"), i18nc("Program Name", "Privacy Browser"), QLatin1String("0.8")); + KAboutData aboutData(QLatin1String("privacybrowser"), i18nc("Program Name", "Privacy Browser"), QLatin1String("0.9")); // Add the author name, job description, email address, and website. aboutData.addAuthor(i18nc("Developer Information", "Soren Stoutner"),i18nc("Developer Information", "Principal developer"), QLatin1String("soren@stoutner.com"), @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) // Populate additional about data info. aboutData.setBugAddress("https://redmine.stoutner.com/projects/privacy-browser-pc/issues"); - aboutData.setCopyrightStatement(i18nc("Copyright", "Copyright 2016-2017, 2021-2025 Soren Stoutner <soren@stoutner.com>")); + aboutData.setCopyrightStatement(i18nc("Copyright", "Copyright 2016-2017, 2021-2026 Soren Stoutner <soren@stoutner.com>")); aboutData.setDesktopFileName(QLatin1String("com.stoutner.privacybrowser")); aboutData.setHomepage(QLatin1String("https://www.stoutner.com/privacy-browser-pc/")); //aboutData.setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersions); <https://redmine.stoutner.com/issues/822> diff --git a/src/privacybrowser.1 b/src/privacybrowser.1 index b4b53a3..8ccc69d 100644 --- a/src/privacybrowser.1 +++ b/src/privacybrowser.1 @@ -1,5 +1,5 @@ .\" SPDX-License-Identifier: GPL-3.0-or-later -.\" SPDX-FileCopyrightText: 2023-2025 Soren Stoutner <soren@stoutner.com> +.\" SPDX-FileCopyrightText: 2023-2026 Soren Stoutner <soren@stoutner.com> .\" .\" This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>. .\" @@ -17,7 +17,7 @@ .\" this program. If not, see <https://www.gnu.org/licenses/>. .\" Title Header. -.TH "Privacy Browser" 1 "30 January 2025" "version 0.8" "Privacy Browser User Manual" +.TH "Privacy Browser" 1 "25 April 2026" "version 0.9" "Privacy Browser User Manual" .\" Section Header - Name. .SH NAME diff --git a/src/widgets/UrlLineEdit.cpp b/src/widgets/UrlLineEdit.cpp index 73583a0..d21474b 100644 --- a/src/widgets/UrlLineEdit.cpp +++ b/src/widgets/UrlLineEdit.cpp @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-3.0-or-later - * SPDX-FileCopyrightText: 2024-2025 Soren Stoutner <soren@stoutner.com> + * SPDX-FileCopyrightText: 2024-2026 Soren Stoutner <soren@stoutner.com> * * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc/>. * @@ -64,12 +64,8 @@ void UrlLineEdit::setText(const QString &urlString) // Calculate the URL string length. int urlStringLength = urlString.length(); - // Initialize the end of schema index. - int endOfSchemaIndex = 0; - - // Get the index of the end of the schema if it exists. - if (urlString.contains(QLatin1String("//"))) - endOfSchemaIndex = urlString.indexOf(QLatin1String("//")) + 2; + // Get the index of end of the schema. + int endOfSchemaIndex = urlString.indexOf(QLatin1String("//")) + 2; // Get the index of the `/` immediately after the domain name. If this doesn't exit it will be set to `-1`. int endOfDomainNameIndex = urlString.indexOf(QLatin1Char('/'), endOfSchemaIndex); @@ -110,6 +106,18 @@ void UrlLineEdit::setText(const QString &urlString) // Apply the URL highlighting. event(&inputMethodEvent); } + else // Reset the URL highlighting. + { + // Create an empty input method event attribute list. + QList<QInputMethodEvent::Attribute> inputMethodEventAttributeList; + + // Create an input method event with an empty pre-edit string. + QInputMethodEvent inputMethodEvent(QLatin1String(""), inputMethodEventAttributeList); + + // Apply the empty URL highlighting. + event(&inputMethodEvent); + + } // Run the default commands. KLineEdit::setText(urlString); -- 2.53.0