kendo-ui-core icon indicating copy to clipboard operation
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.

Open gdenchevprog opened this issue 4 years ago • 1 comments

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.

  1. Once you've downloaded and extracted it open the Views/Shared/EditorTemplates/MultilineTextboxEditor.cshtml file with an editor such as Notepad++.
  2. In Notepad++ navigate to Edit->EOL Conversion and select UNIX/OSX Format if it's not already selected and save the file.
  3. 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. image

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]

gdenchevprog avatar Dec 16 '20 14:12 gdenchevprog

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.

palhal avatar Feb 20 '22 16:02 palhal