-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.17, 3.11.10, 4.0.4, 4.0.8, 4.2, 4.3
-
MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
Line breaks within textarea form elements are counted differently between server and client side validation of the maxlength rule. The client side validation counts a line break as a single character while the validation on the server counts it as two.
Browsers usually send the CR and LF for a line break. I also tested umlaute (ä, ö, ü) and other non-ASCII characters since I suspected byte vs. UTF code point count but I was only able to reproduce the behaviour with line breaks.
I used the attached PHP script for manual testing. I verified that the issue is present in current master branch.