Completed
Last Updated: 07 Nov 2023 09:38 by ADMIN
Release R1.2024-Increment.1(15.Nov.2023)
Frieder
Created on: 21 Jul 2023 09:07
Category: Scheduler
Type: Bug Report
1
Encoded character breaks the custom editor template

### Bug report

When the custom editor template of the Scheduler contains a label text with a special character, it is encoded automatically. If the encoding contains a hash literal (#), it throws a client-side error "Invalid template".

### Reproduction of the problem

1. Create a Scheduler with a custom editor template.

2. Add a label for a specified Model property by using the @(Html.LabelFor(model => model)) configuration.

3. Add a label text with a special character as per the example below.

<div class="k-edit-label">
    @(Html.LabelFor(model => model.Title, "DurchfΓΌehrung"))
</div>

<div data-container-for="title" class="k-edit-field">
    @(Html.Kendo().TextBoxFor(model => model.Title)
        .HtmlAttributes(new  { data_bind = "value: title"})
      )
    <span data-for="title" class="k-invalid-msg"></span>
</div>

4. Try to add an event or edit an existing event. Open the browser console to review the error:

### Expected/desired behavior

The hash literals in the encoded strings should be escaped automatically.

### Environment

* **Telerik UI for ASP.NET Core version: 2023.2.718
* **Browser: [all]

0 comments