Topic: [Bug] Comment previews doesn't support non-ASCII characters

Posted under Site Bug Reports & Feature Requests

Bug overview description.
If you try to have a character in a comment that is not A-Z, a number or punctuation sign, the comment preview won't show up unless you remove said character.

What part(s) of the site page(s) are affected?
The preview box in the comment section below a post.

What is the expected behavior?
That the preview is displayed when a non-ASCII character is entered in the text field, like it does when previewing a thread reply or editing a comment in https://e621.net/comment/edit/<commentId>.

What actual behavior is given instead?
No preview is displayed. If a preview is present before the non-ASCII character was added, the preview won't update.

Time of incident (if applicable).
19 days ago when writing comment #3936748.

Can you reproduce the bug every time?
Yes.

What steps did you take to replicate this bug?

  • Go to any post, like post #12345.
  • Enter a non-ASCII character in the comment box, like ♦.
  • Click the Preview button.

Errors or other messages returned (if any).
Nothing on my end, hopefully an error message is returned in the server log.

Updated by KiraNoot

Known issue; been around for years. Another known issue that's been around for years is if you type something like this into a note:

Text A

Text B

You get this

Text AText B

Both of these bugs can occasionally be slightly annoying if I'm writing translations and trying to use the comment preview as a sort of note preview.

Updated by anonymous

It seems like cloudflare or some middleware gets confused by html fragments as responses, and it mangles them. Previews are the only part of the site that currently use them. They mysteriously work in dev environments, so it's something between the output of the server and the clients. We've turned off automatic html compression on cloudflare but that doesn't seem to have helped.

Moving them over to a different response type is an option, but I haven't had the time to sit down and convert everything over to, say, json strings.

Updated by anonymous

  • 1