New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server checks character limit overzealously #5433

Closed
KrzysiekJ opened this Issue Oct 17, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@KrzysiekJ
Contributor

KrzysiekJ commented Oct 17, 2017

I’ve attempted to submit the following toot:

If we want to achieve compatibility between #web #browsers, it is important to implement #standards strictly, without non-standard error recovery. For example, someone mistyped backslashes into stylesheet URL on kobo.com. #Chrome and #Firefox convert backslashes into slashes, while #Pale_Moon displays website without any styles (correctly, I presume).

BTW, on Firefox there is currently error 500, which suggests that the server acts differently depending on user agent string (another mistake).

This toot has 498 characters and this number is reported by the UI. However, when trying to submit it, I get the “422 Negatywne sprawdzenie poprawności: Text limit 500 znaków przekroczony” error saying that the character limit has been exceeded. My guess is that the server wants to convert kobo.com into an URL, which will result in a bigger number of characters. However if I wanted to make an URL, I would put protocol part in it.

The server runs Mastodon 1.6.1.


  • [×] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
@unarist

This comment has been minimized.

Show comment
Hide comment
@unarist

unarist Oct 17, 2017

Collaborator

Looks like the server treats kobo.com as an URL which should be auto-linked, and we count any those URLs as 23 characters.

However, we don't capture scheme-less URLs, so kobo.com should be counted as 8 characters.

Collaborator

unarist commented Oct 17, 2017

Looks like the server treats kobo.com as an URL which should be auto-linked, and we count any those URLs as 23 characters.

However, we don't capture scheme-less URLs, so kobo.com should be counted as 8 characters.

@unarist unarist added the bug label Oct 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment