Greasy Fork is available in English.

Discussions » Greasy Fork Feedback

Incorrect Counting for Additional Info Text Length

§
Posted: 23.09.2023
Edited: 23.09.2023

To Jason:

It said maximum is 50000 characters.

but the textarea.value.length is just 49248.

I tried to use other ways to find the number 50000.

I cannot get it.

What is the conversion in Ruby? I guess Ruby might convert "<" and ">" to "<" ">", but the length is then much longer than 50000.

Is Chinese considered as two-character length in that 50000 limit?

And the 50000 limit is after markdown converted to HTML or the original text?

OK. I found it.

\n is treated as 2 characters. Is it because the conversion from \n to \r\n ?

Anyway, the counting is incorrect. \n shall be 1 char.

Post reply

Sign in to post a reply.