Backport #37388 by @wxiaoguang Fix #27120 By the way, refactor ReserveLineBreakForTextarea to NormalizeStringEOL Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>