fix: /openurl can now open urls with spaces, assuming the url allows it (#5197)
This allows for commands like `/openurl https://www.deepl.com/en/translator#auto/en/{1+}` that previously worked
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
|||||||
- Minor: Chatters from recent-messages are now added to autocompletion. (#5116)
|
- Minor: Chatters from recent-messages are now added to autocompletion. (#5116)
|
||||||
- Minor: Added a _System_ theme that updates according to the system's color scheme (requires Qt 6.5). (#5118)
|
- Minor: Added a _System_ theme that updates according to the system's color scheme (requires Qt 6.5). (#5118)
|
||||||
- Minor: Added icons for newer versions of macOS. (#5148)
|
- Minor: Added icons for newer versions of macOS. (#5148)
|
||||||
- Minor: Added the `--incognito/--no-incognito` options to the `/openurl` command, allowing you to override the "Open links in incognito/private mode" setting. (#5149)
|
- Minor: Added the `--incognito/--no-incognito` options to the `/openurl` command, allowing you to override the "Open links in incognito/private mode" setting. (#5149, #5197)
|
||||||
- Minor: Added support for the `{input.text}` placeholder in the **Split** -> **Run a command** hotkey. (#5130)
|
- Minor: Added support for the `{input.text}` placeholder in the **Split** -> **Run a command** hotkey. (#5130)
|
||||||
- Minor: Add a new Channel API for experimental plugins feature. (#5141, #5184, #5187)
|
- Minor: Add a new Channel API for experimental plugins feature. (#5141, #5184, #5187)
|
||||||
- Minor: Added the ability to change the top-most status of a window regardless of the _Always on top_ setting (right click the notebook). (#5135)
|
- Minor: Added the ability to change the top-most status of a window regardless of the _Always on top_ setting (right click the notebook). (#5135)
|
||||||
|
|||||||
@@ -443,6 +443,8 @@ QString openURL(const CommandContext &ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QCommandLineParser parser;
|
QCommandLineParser parser;
|
||||||
|
parser.setOptionsAfterPositionalArgumentsMode(
|
||||||
|
QCommandLineParser::ParseAsPositionalArguments);
|
||||||
parser.addPositionalArgument("URL", "The URL to open");
|
parser.addPositionalArgument("URL", "The URL to open");
|
||||||
QCommandLineOption privateModeOption(
|
QCommandLineOption privateModeOption(
|
||||||
{
|
{
|
||||||
@@ -469,7 +471,7 @@ QString openURL(const CommandContext &ctx)
|
|||||||
"Usage: /openurl <URL> [--incognito/--no-incognito]"));
|
"Usage: /openurl <URL> [--incognito/--no-incognito]"));
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
auto urlString = parser.positionalArguments().at(0);
|
auto urlString = parser.positionalArguments().join(' ');
|
||||||
|
|
||||||
QUrl url = QUrl::fromUserInput(urlString);
|
QUrl url = QUrl::fromUserInput(urlString);
|
||||||
if (!url.isValid())
|
if (!url.isValid())
|
||||||
|
|||||||
Reference in New Issue
Block a user