Skip to content
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
1 task
KrzysiekJ opened this issue Oct 17, 2017 · 1 comment · Fixed by #5435
Closed
1 task

Server checks character limit overzealously #5433

KrzysiekJ opened this issue Oct 17, 2017 · 1 comment · Fixed by #5435
Labels
bug Something isn't working

Comments

@KrzysiekJ
Copy link
Contributor

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
Copy link
Contributor

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 Something isn't working label Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants