Limit the length of generated anchor URL for markdown headers
What does this MR do and why?
Contributes to #204808
Problem
There is no limitation for generated header anchors. It might cause performance problems for long headers processing.
More details: https://gitlab.com/gitlab-org/gitlab/-/issues/204808#note_814064215
Solution
Limit anchor link length with 255 characters.
How to set up and validate locally
- Download snippet from https://gitlab.com/gitlab-org/gitlab/-/issues/204808#summary
- Go to new snippet page (http://127.0.0.1:3000/-/snippets/new)
- Paste snippet content and set filename to
test.md
- Save snippet form
- Verify that the snippet was successfully created and accessible for a view
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin