Error with apostrophe character in TextLine fields

Enonic version: 7.7.4
OS: macOS 12.0.1
Content Studio version: 3.3.4

It seems we have a bug in Content Studio version 3.3.4 (I haven’t tested it on others).
I see in Chrome Console that an error always occurs when I have an apostrophe character in some TextField element.
If I remove the character, the error stops.

main.js:3 Cannot evaluate script ["use strict";var title = ''; var shortTitle = ''; var englishTitle = ''; var url = ''; var image = ''; var imageText = ''; title = 'New title with apostrophe 's'; url = ''; `${title}`.trim().replace(/\s+/g, ' ')]. SyntaxError: Unexpected identifier
    at DisplayNameResolver.safeEval (main.js:3:1708720)
    at DisplayNameResolver.execute (main.js:3:1706534)
    at main.js:1:110715
    at main.js:1:335992
    at Array.forEach (<anonymous>)
    at TextInput.FormInputEl.notifyValueChanged (main.js:1:335971)
    at TextInput.FormInputEl.refreshValueChanged (main.js:1:335289)
    at TextInput.FormInputEl.setValue (main.js:1:333075)
    at ContentWizardHeader.WizardHeaderWithDisplayNameAndName.setDisplayName (main.js:1:112251)
    at HTMLDivElement.<anonymous> (main.js:3:1672407)

The error happens in any text field that has the character.

1 Like

Hi. Just to keep you updated:

I tested the same thing in Content Studio 4.0.1 (Enonic 7.8.1) and the bug is there too.

1 Like

Hello @zepaduajr, thank you for reporting this. We’ve also managed to reproduce it and will fix it in the next release.

1 Like

This is now fixed in Content Studio 4.0.2