Support for using single quotes in filter from jsdo

Posted by MTBOO on 15-Apr-2016 08:26

Hi,

Using single quotes in filters from the client via the jsdo does not work as the query string gets two single quotes passed to the back-end. For example trying to search for customers where name begins "O'Conn" causes the filter string to be represented as 'O''Conn'.

Are there any plans to change progress.util._convertToABLWhereString to support single quotes appropriately ?

Regards

All Replies

Posted by Mike Fechner on 15-Apr-2016 08:28

In addition to Manjinder's findings, I was able to fix the issue by adding the replace method here withint the _convertToABLWhereString function:

                    // We need to build a template format string for the where string. 
                    // We'll first add positional info for the value
                    if (type === STRING_OBJECT_TYPE) {
                        // Mike Fechner, 15.04.2016 - potential fix for SCL-1277, problem with filter values
                        // containing single quotes
                        value = value.replace("'", "~047");
                        format = "'{1}'";
                    } 

Posted by maura on 15-Apr-2016 09:10

You should enter a bug for this

Maura

This thread is closed