Closed
Description
Symfony version(s) affected: 4.3.3
Description
Due to usage of substr
in place of mb_substr
in backspace portion of QuestionHelper::autocomplete
it remove only one byte from the end of utf-8 strings instead of two, resulting in mangled input and possible errors.
Maybe there are reasons not to use mb_substr
?
How to reproduce
- Input any utf-8 string in autocomplete input
- Tap backspace
- Now your input string is damaged beyond recognition
Possible Solution
Quick fix that helped me was to replace substr
with mb_substr
in backspace handling portion of QuestionHelper::autocomplete