mojira.dev
MC-94800

URL shown in open URL dialog is not shortened

The bug

The URL shown in the "Are you sure you want to open the following website?" dialog is not shortened. This causes for example the warning to unreadable.

How to reproduce

  1. Use the following command

    /tellraw @p {"text":"Link","clickEvent":{"action":"open_url","value":"http://example.com/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}}
  2. Click on the word "Link" in the chat

Expected behaviour

I would expect the link to be shortened to a maximum of two lines making sure that the protocol and domain are visible (and possibly highlighted?), replacing prefix and suffix with "..." if necessary.

Linked issues

Attachments

Comments 15

Is this still an issue in the latest snapshot 16w44a? If so please update the affected versions.

This is an automated comment on any open or reopened issue with out-of-date affected versions.

Confirmed for 1.13.1.

Confirmed in 1.16-pre5.

Can confirm in 20w48a.

5 more comments

It doesn’t hide the Warning message (and there is not warning message), but it displays the text on the buttons

[media]

there is not warning message

@Loupieur Please file a separate bug report for this. I have drafted the following description for your convenience.

### The bug
The warning text in the confirm link screen is no longer visible.

### Steps to reproduce
1. Join a world with commands enabled.
2. Run the following command to send yourself a JSON message that will open a URL when clicked on.
```
/tellraw @s {"text":"text","click_event":{"action":"open_url","url":"https://bugs.mojang.com/browse/MC"}}
```
3. Open the chat window and click on the JSON message. A confirm link screen will open.
4. Take note as to whether the warning text in the confirm link screen is visible.

### Observed behavior
The warning text in the confirm link screen will not be visible.

### Expected behavior
The warning text in the confirm link screen would be visible, as was the case in versions prior to 25w18a.

MrMuskle you want to I report this other bug ?

I posted another report of bug, you cab see it

marcono1234

etanaratsastaja

Confirmed

UI

dialogue, url

Minecraft 15w51b, Minecraft 16w36a, Minecraft 1.11, Minecraft 1.11.2, Minecraft 17w06a, ..., 1.19.2, 23w12a, 1.20.2, 1.21.4, 1.21.5

1.21.6 Pre-Release 1

Retrieved