Entity data breaking Localization/Message and EntityDataFind screens

We seem to have an issue with some missing escaping using qvt rendering.
When adding a LocalizationMessage like:

    <moqui.basic.LocalizedMessage original="${AAAtest '" locale="es" localized="test \'"/>

it breaks both screens (http://localhost:8080/qapps/system/Localization/Messages and http://localhost:8080/qapps/tools/Entity/DataEdit/EntityDataFind?selectedEntity=moqui.basic.LocalizedMessage)

The string in the “original” field is not relevant in this case, the way it is chosen is just so it appears in the first results screen. The sequence that generates the problem is the backslash-singleQuote in the “localized” field. This appears to mess up the message sent in the qvt rendering. Both screens keep working fine when using either server based (html) or vuet rendering.

Not sure where to add the necessary escaping, any ideas?

1 Like

I was able to reproduce by adding the data above to the add data screen. And going to both links.

The behavior appears to be sending html, but not rendering the page when \' is on the page. This can be applied to any entity field (tested on enumeration) with the same functionality.

Here’s what I’ve tested. I’ve loaded the data above, and went to the url of http://localhost:8080/vapps/tools/Entity/DataEdit/EntityDataFind?original=${AAAtest%20%27&selectedEntity=moqui.basic.LocalizedMessage&original_op=contains&original_ic=Y&submitButton=submitButton

Then, I’ve edited the EntityDataFind.xml screen to be like:

<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
        default-menu-title="Find" default-menu-index="2">

    <parameter name="selectedEntity" required="true"/>

    <actions>
        <entity-find entity-name="${selectedEntity}" list="entityValueList" offset="0" limit="50" use-clone="true">
            <search-form-inputs/>
        </entity-find>
        <log level="warn" message="entityValueList?.first() ${entityValueList?.first().localized}"/>
    </actions>
    <widgets>
        <!-- Put testing content here -->
    </widgets>
</screen>

The vapps screen looks like this:

And the qapps screen looks like:

The way that the elements actually get rendered in different modes are just freemarker templates.

The problem is almost certain in differences between the vapps form-list macro or qapps form-list macro

Hope that helps!