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

Docs: Specify the string length limitation when verifying paste patterns #2855

Open
asebert-caue opened this issue Oct 25, 2024 · 2 comments

Comments

@asebert-caue
Copy link

Hello,
While integrating my own service with the embed tool, I noticed that there is a 450-character limitation for paste patterns.
Link to the relevant code line
I have opened an issue: GitHub Issue #135
I am not sure if this limitation is intentional or not, but I think it would be beneficial to have the ability to adjust this limit.

@neSpecc
Copy link
Member

neSpecc commented Oct 25, 2024

Regex checking is a slow operation. It was added to prevent main thread freeze when user pastes a long string.

What length will be optimal for you?

@asebert-caue
Copy link
Author

Thank you for your response. I understand the need to lock things down to keep the application running smoothly, and I don't have a specific benchmark in mind for text length.

However, the maximum length for URLs is typically 2048 characters, although this can vary depending on the browser and server. Given this, it might be useful to allow for a higher limit than 450 characters to accommodate longer URLs. Is this length already too long?

Additionally, it would be helpful to specify this limit in the documentation so that users don't mistakenly attribute issues to a poor implementation of their regex.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants