When including certain percent-encoded characters in the open_url url, the browser does not open, and no errors show up. The loading circle appears very briefly next to the mouse, as if something should have happened.
When running a command like
/tellraw @s [{"text":"%2F '/'","color":"yellow","click_event": {"action":"open_url","url": "https://abc%2F"}}]
and clicking the text, the browser does not open. This of course happens without 'abc' as well.
When the command includes a percent-encoded 'A' for example, the browser still opens, albeit with it displaying an error as the URL does not exist.
/tellraw @s [{"text":"%41 'A'","color":"yellow","click_event": {"action":"open_url","url": "https://%41"}}]
Including any of the following characters anywhere after the '//' results in the browser not opening.
%2F '/'
%3F '?'
%5C '\'
%00 null
I believe with (probably) every other character, at least a new browser window opens, even if the URL isn't navigated to.
Using Firefox, in case this is somehow different between browsers.
Linked issues
testing discovered 1
Comments 2
I can confirm. For me (running Linux) Minecraft opens a new browser window, or simply opens the browser if it wasn't already open. Although you need an invalid URL to replicate the bug (as apple502j noted), the handling of invalid URLs is inconsistent and appears to be undefined, so there is still a valid bug here.
Here are the URLs I tested:
URL | Description | Behaviour | Intended? | Notes |
---|---|---|---|---|
| Normal, well-formed URL | URL opens in browser | Yes | |
| URL without a top-level domain (TLD) | URL opens in bowser | Very likely | |
| URl without TLD, with url-encoded character | New browser window opens (see above) | No | This is the kind of URL that the bug report is describing |
| Well-formed URL that contains a url-encoded character | URL opens in bowser | Yes |
I also use Firefox.
I believe this is intended, since it is an invalid URL.