Using certain percent-encoded characters in open_url action of click_event does not open browser
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 discovered1
- Unresolved
mattp_12- 5
- 3
- Confirmed
Low
- Platform
- Commands UI
1.19 - 25w06a
1.19 1.19.1-pre2 1.19.1-pre3 1.19.1-pre4 1.19.1-pre5 1.19.1-pre6 1.19.1-rc2 1.19.1 1.19.2 22w42a 22w43a 22w44a 22w45a 22w46a 1.19.3-pre1 1.19.3-pre2 1.19.3-pre3 1.19.3-rc1 1.19.3-rc2 1.19.3-rc3 1.19.3 23w03a 23w04a 23w05a 23w06a 23w07a 1.19.4-pre1 1.19.4-pre2 1.19.4-pre3 1.19.4-pre4 1.19.4-rc1 1.19.4-rc2 1.19.4-rc3 1.19.4 23w12a 23w13a 23w14a 23w16a 23w17a 23w18a 1.20-pre1 1.20-pre2 1.20-pre4 1.20-pre5 1.20-pre6 1.20-pre7 1.20-rc1 1.20 1.20.1-rc1 1.20.1 23w31a 23w32a 23w33a 23w35a 1.20.2-pre2 1.20.2-pre3 1.20.2-pre4 1.20.2-rc1 1.20.2-rc2 1.20.2 23w40a 23w41a 23w42a 23w43a 23w43b 23w44a 23w45a 23w46a 1.20.3-pre1 1.20.3-pre2 1.20.3-pre3 1.20.3-pre4 1.20.3-rc1 1.20.3 1.20.4-rc1 1.20.4 23w51b 24w03a 24w03b 24w04a 24w05a 24w06a 24w07a 24w09a 24w10a 24w11a 24w12a 24w13a 24w14a 1.20.5-pre1 1.20.5-pre2 1.20.5-pre3 1.20.5-pre4 1.20.5-rc2 1.20.5 1.20.6-rc1 1.20.6 24w18a 24w19b 24w20a 24w21a 24w21b 1.21-pre1 1.21-pre2 1.21-pre3 1.21-pre4 1.21-rc1 1.21 24w33a 1.21.1-rc1 1.21.1 24w34a 24w35a 24w36a 24w37a 24w38a 24w39a 24w40a 1.21.2-pre1 1.21.2-pre2 1.21.2-pre3 1.21.2-rc1 1.21.2-rc2 1.21.2 24w44a 1.21.3 24w46a 1.21.4-pre1 1.21.4-rc3 1.21.4 25w02a 25w03a 25w04a 25w05a 25w06a
Created Issue:
Using certain percent-encoded characters in open_url action of clickEvent does not open browser
When including certain percent-encoded characters in the open_url value, 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
execute as @p run tellraw @s [{"text":"%2F '/'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
execute as @p run tellraw @s [{"text":"%41 'A'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
testing discovered
When including certain percent-encoded characters in the open_url value, 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
/execute as @p run tellraw @s [{"text":"%2F '/'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
/execute as @p run tellraw @s [{"text":"%41 'A'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
When including certain percent-encoded characters in the open_url value, 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
/execute as @p runtellraw @s [{"text":"%2F '/'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
/execute as @p runtellraw @s [{"text":"%41 'A'","color":"yellow","clickEvent": {"action":"open_url","value": "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.
When including certain percent-encoded characters in the open_url
value, 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","clickEvent": {"action":"open_url","value": "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","clickEvent": {"action":"open_url","value": "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.
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.
Using certain percent-encoded characters in open_url action of clickEvent does not open browserUsing certain percent-encoded characters in open_url action of click_event does not open browser
I believe this is intended, since it is an invalid URL.
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:
I also use Firefox.