5

This chat message has a link to show more text at the bottom of it, but when clicked there isn't actually any more text to show:

Before click:

Image of message body before click

After click:

Image of message body after click

3
  • 2
    Probably a newline issue with messages under 500 characters. The message is 416 characters. Commented May 15, 2020 at 12:51
  • 1
    Wait, no. It's 530. With the links truncated, it's 416 Commented May 15, 2020 at 13:09
  • 2
    okay, I got it. I can't repro with sufficiently long messages, but if they contain sufficiently long links, it breaks hard. chat.stackoverflow.com/transcript/message/49385286#49385286 - i.imgur.com/dNUEfTq.png - only the transcript has valid expansion because it shows plain-text links because of the newlines. Chat follows the transcript's expansion policy, but because it isn't a code block, the URL is rendered, and what it tries to expand isn't necessary anymore. All of the message, now that the URLs have been truncated, fits, but the raw length of it causes (read more) to show Commented May 15, 2020 at 13:15

1 Answer 1

3

This appears to happen when a URL is truncated in newline messages. Example here (along with failed attempts):

In the transcript, it does show the (see full text) link as well, but it actually has something to expand - the link. In the chat itself, the link has been converted to an <a> and shortened. In this specific case, the raw message is 720 characters. That's enough to trigger shortening. However, in chat, the URLs have been shortened (significantly in this case; I used one of the longest valid URLs just for testing purposes), and the real message as displayed in chat is only 257 characters.

My best guess here is that the URLs are converted and truncated before the expansion ((see full text) and "preview") is generated after the URLs have been shortened, but that the length used to determine whether truncating the message itself is necessary uses the raw length, which is 720 chars in this case. It determines it needs to show a link to expand the full content, but the shortened URLs make it unnecessary, and makes the message content fall under the length at which it starts cutting off the message. The result is a (see full text) that does nothing, because the rendered content length is already short enough to fully display the message.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .