kendo-ui-core
kendo-ui-core copied to clipboard
New lines are not removed from Editor Templates in child grid of a hierarchy when the EOL is the \n character.
Bug report
Reported in ticket 1499258. Similar to: #1899
Reproduction of the problem
A runnable project sample can be found in the first comment of the ticket.
- Once you've downloaded and extracted it open the Views/Shared/EditorTemplates/MultilineTextboxEditor.cshtml file with an editor such as Notepad++.
- In Notepad++ navigate to Edit->EOL Conversion and select UNIX/OSX Format if it's not already selected and save the file.
- Run the project and expand one of the detail grids. An Invalid or Unexpected token error will be thrown in the Browser console. Optional - switch back to Windows Format in the EOL Conversion menu and try running the project again, everything should function as expected.
Current behavior
When an \n character is used as a new line, an error is thrown in the console and the grid doesn't function properly.
Expected/desired behavior
No error should be thrown and the detail grid should expand properly. The \n character should be replaced with an empty string the same way \r\n is for Editors in Client Templates.
Environment
- Kendo UI version: 2020.3.1118
- jQuery version: 1.12.4
- Browser: [all]
You won't believe how many hours I've wasted to find out why the console showed "Invalid or unexpected token". I hope this gets fixed ASAP. This is especially a problem on *NIX systems.