Using a single quote in a view label breaks generation

Posted by GregHiggins on 24-Apr-2018 03:54

This is best seen in the example provided by Thierry Ciot blog HW1. 

Posted by Thierry Ciot on 26-Apr-2018 11:56

Got it. Sorry I had assumed you were talking about the label of the custom hello world sample.  I can reproduce this in both V2 and the upcoming V3.  I will submit a bug.

Posted by Thierry Ciot on 26-Apr-2018 12:01

Here is the bug: gitlab.telerik.com/.../1412

All Replies

Posted by Thierry Ciot on 24-Apr-2018 13:03

Greg,

I tried this using Hello World custom view and it works fine, both at design time and at run-time.

Here is how it looks for me:

There is nothing special with these properties containing a ' character as it does not terminate the javascript string in the model.  Here is what my generated controller looks like:

this.$model = {
   "titleY": "Test '",
   "greeting": "Test ' Hello"
};

Could you check your controller.js file and report what it contains?

Thanks, Thierry.

Posted by GregHiggins on 24-Apr-2018 15:40

KUIB 2.1.0.23 

View -> Label

Design Time:

Ultimately previewing as

Posted by Thierry Ciot on 25-Apr-2018 15:59

Greg,

Could you check your controller.js file and report what it contains (at the lines around where this.$model is defined)?

Posted by wes.rector on 26-Apr-2018 09:03

When you publish this is what comes out to the app.bundle.js file for the <li> tag for a view with a single quote in the label, which of course causes breakage:

<li class=\\\"nav-item\\\" data-state=\\\"module.default.searching.filteredgrid\\\" title=\\\"{{ (('modules.searching.views.filteredgrid.label' | translate) === 'modules.searching.views.filteredgrid.label') ? 'Quote's In The Label' : ('modules.searching.views.filteredgrid.label' | translate) }}\\\">\\r\\n                <a ui-sref=\\\"module.default.searching.filteredgrid\\\">\\r\\n                    <span>{{ (('modules.searching.views.filteredgrid.label' | translate) === 'modules.searching.views.filteredgrid.label') ? 'Quote's In The Label' : ('modules.searching.views.filteredgrid.label' | translate) }}</span>\\r\\n                </a>\\r\\n            </li>

Posted by Thierry Ciot on 26-Apr-2018 11:56

Got it. Sorry I had assumed you were talking about the label of the custom hello world sample.  I can reproduce this in both V2 and the upcoming V3.  I will submit a bug.

Posted by Thierry Ciot on 26-Apr-2018 12:01

Here is the bug: gitlab.telerik.com/.../1412

This thread is closed